16
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
18
18
"""
19
- from numpy import get_include as get_numpy_include
19
+ import numpy
20
20
from platform import system as get_os_name
21
21
from setuptools import Extension , find_packages , setup
22
22
from setuptools .command .build_ext import build_ext as _build_ext
28
28
os_compile_flags = []
29
29
30
30
31
- # Required for the automatic installation of numpy
32
- class build_ext (_build_ext ):
33
- def finalize_options (self ):
34
- _build_ext .finalize_options (self )
35
- # Prevent numpy from thinking it is still in its setup process:
36
- __builtins__ .__NUMPY_SETUP__ = False
37
- import numpy
38
-
39
- self .include_dirs .append (numpy .get_include ())
40
-
41
-
42
31
solver_module = Extension (
43
32
"pyscm._scm_utility" ,
44
33
language = "c++" ,
45
34
sources = ["cpp_extensions/utility_python_bindings.cpp" , "cpp_extensions/solver.cpp" ],
46
35
extra_compile_args = ["-std=c++0x" ] + os_compile_flags ,
36
+ include_dirs = [numpy .get_include ()]
47
37
)
48
38
49
- dependencies = ["numpy" , "scipy " , "scikit-learn" , "six" ]
39
+ dependencies = ["numpy<2 " , "scikit-learn" , "six" ]
50
40
51
41
with open ("README.md" , "r" ) as f :
52
42
long_description = f .read ()
@@ -55,8 +45,6 @@ def finalize_options(self):
55
45
name = "pyscm-ml" ,
56
46
version = "1.1.1" ,
57
47
packages = find_packages (),
58
- cmdclass = {"build_ext" : build_ext },
59
- setup_requires = dependencies ,
60
48
install_requires = dependencies ,
61
49
author = "Alexandre Drouin" ,
62
50
@@ -77,6 +65,4 @@ def finalize_options(self):
77
65
"Topic :: Scientific/Engineering :: Artificial Intelligence" ,
78
66
],
79
67
ext_modules = [solver_module ],
80
- test_suite = "nose.collector" ,
81
- tests_require = ["nose" ],
82
68
)
0 commit comments