Maniverse 0.2__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Maniverse might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Maniverse
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Function optimization on manifolds
5
5
  Home-page: https://github.com/FreemanTheMaverick/Maniverse.git
6
6
  Author: FreemanTheMaverick
@@ -5,5 +5,4 @@ setup.py
5
5
  Maniverse.egg-info/PKG-INFO
6
6
  Maniverse.egg-info/SOURCES.txt
7
7
  Maniverse.egg-info/dependency_links.txt
8
- Maniverse.egg-info/requires.txt
9
8
  Maniverse.egg-info/top_level.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Maniverse
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: Function optimization on manifolds
5
5
  Home-page: https://github.com/FreemanTheMaverick/Maniverse.git
6
6
  Author: FreemanTheMaverick
@@ -1,5 +1,5 @@
1
1
  [metadata]
2
- description-file = README.md
2
+ description_file = README.md
3
3
 
4
4
  [egg_info]
5
5
  tag_build =
@@ -1,8 +1,8 @@
1
1
  import os
2
- import urllib.request
2
+ import wget
3
3
  import tarfile
4
4
  import subprocess
5
- from setuptools import setup
5
+ from setuptools import setup, find_packages
6
6
  from setuptools.command.build import build
7
7
 
8
8
  class CustomBuild(build):
@@ -19,13 +19,13 @@ class CustomBuild(build):
19
19
  print("AR is %s." % AR)
20
20
 
21
21
  # Checking dependencies
22
- PYTHON3 = os.getenv("PYTHON3")
22
+ PYTHON3 = os.getenv("PYTHON3", default = '')
23
23
  print("Looking for Python.h at %s ..." % PYTHON3, end='')
24
- if os.path.isfile(PYTHON3 + "Python.h"):
24
+ if os.path.isfile(PYTHON3 + "/Python.h"):
25
25
  print("Found!")
26
26
  else:
27
27
  raise RuntimeError("Python.h does not exist!")
28
- EIGEN3 = os.getenv("EIGEN3")
28
+ EIGEN3 = os.getenv("EIGEN3", default = '')
29
29
  if len(EIGEN3) > 0:
30
30
  print("Looking for Eigen3 at %s ..." % EIGEN3, end='')
31
31
  if os.path.exists(EIGEN3 + "/Eigen/") and os.path.exists(EIGEN3 + "/unsupported/") and os.path.isfile(EIGEN3 + "/signature_of_eigen3_matrix_library"):
@@ -34,25 +34,27 @@ class CustomBuild(build):
34
34
  raise RuntimeError("Python.h does not exist!")
35
35
  else:
36
36
  print("The environment variable $EIGEN3 is not set. -> Downloading ...")
37
- urllib.request.urlretrieve("https://gitlab.com/libeigen/eigen/-/archive/3.4-rc1/eigen-3.4-rc1.tar.gz", pwd)
38
- with tarfile.open(tarball_path) as tar:
37
+ filename = wget.download("https://gitlab.com/libeigen/eigen/-/archive/3.4-rc1/eigen-3.4-rc1.tar.gz", bar = None)
38
+ with tarfile.open(filename) as tar:
39
39
  tar.extractall(path = pwd) # Directory: eigen-3.4-rc1
40
40
  EIGEN3 = pwd + "/eigen-3.4-rc1/"
41
- PYBIND11 = os.popen("pip show pybind11 | grep 'Location:'").split()[1] + "/pybind11/include/"
41
+ print("EIGEN3 is %s." % EIGEN3)
42
+ PYBIND11 = subprocess.run("pip show pybind11 | grep 'Location:'", capture_output=True, text=True, shell=True).stdout.strip().split()[1] + "/pybind11/include/"
43
+ print("PYBIND11 is %s." % PYBIND11)
42
44
 
43
45
  # Configuring the makefile
44
- subprocess.check_call(["sed", "-i", "'%s/__MAKE__/" + MAKE + "/g", "makefile"])
45
- subprocess.check_call(["sed", "-i", "'%s/__CXX__/" + CXX + "/g", "makefile"])
46
- subprocess.check_call(["sed", "-i", "'%s/__AR__/" + AR + "/g", "makefile"])
47
- subprocess.check_call(["sed", "-i", "'%s/__PYTHON3__/" + PYTHON3 + "/g", "makefile"])
48
- subprocess.check_call(["sed", "-i", "'%s/__EIGEN3__/" + EIGEN3 + "/g", "makefile"])
49
- subprocess.check_call(["sed", "-i", "'%s/__PYBIND11__/" + PYBIND11 + "/g", "makefile"])
46
+ subprocess.check_call(["sed", "-i", "s/__MAKE__/" + MAKE.replace('/', "\/") + "/g", "makefile"])
47
+ subprocess.check_call(["sed", "-i", "s/__CXX__/" + CXX.replace('/', "\/") + "/g", "makefile"])
48
+ subprocess.check_call(["sed", "-i", "s/__AR__/" + AR.replace('/', "\/") + "/g", "makefile"])
49
+ subprocess.check_call(["sed", "-i", "s/__PYTHON3__/" + PYTHON3.replace('/', "\/") + "/g", "makefile"])
50
+ subprocess.check_call(["sed", "-i", "s/__EIGEN3__/" + EIGEN3.replace('/', "\/") + "/g", "makefile"])
51
+ subprocess.check_call(["sed", "-i", "s/__PYBIND11__/" + PYBIND11.replace('/', "\/") + "/g", "makefile"])
50
52
 
51
53
  # Make
52
- nproc = os.popen("nproc")
53
- subprocess.check_call(["sed", "-i", "'%s/__OBJ__/__CPP__/g", "makefile"])
54
+ nproc = subprocess.run("nproc", capture_output=True, text=True).stdout.strip()
55
+ subprocess.check_call(["sed", "-i", "s/__OBJ__/__CPP__/g", "makefile"])
54
56
  subprocess.check_call([MAKE, "-j", nproc])
55
- subprocess.check_call(["sed", "-i", "'%s/__CPP__/__PYTHON__/g", "makefile"])
57
+ subprocess.check_call(["sed", "-i", "s/__CPP__/__PYTHON__/g", "makefile"])
56
58
  subprocess.check_call([MAKE, "-j", nproc])
57
59
 
58
60
  super().run()
@@ -62,11 +64,10 @@ setup(
62
64
  name = "Maniverse",
63
65
  author = "FreemanTheMaverick",
64
66
  description = "Function optimization on manifolds",
65
- version = "0.2",
67
+ version = "0.2.1",
66
68
  url = "https://github.com/FreemanTheMaverick/Maniverse.git",
67
- packages = ["src"],
69
+ packages = find_packages('src'),
68
70
  package_data = { "src": ["lib/*"] },
69
71
  cmdclass = { "build": CustomBuild },
70
- install_requires = ["pybind11>=2.13.6"],
71
72
  classifiers = ["Programming Language :: Python :: 3"]
72
73
  )
@@ -1 +0,0 @@
1
- pybind11>=2.13.6
@@ -1 +0,0 @@
1
- src
File without changes
File without changes