1
1
from setuptools import Command , distutils , Extension , setup
2
- from numpy import get_include
3
2
from platform import system
4
3
5
4
import external
6
5
import sys
7
6
8
7
import setuptools .command .install
8
+ import setuptools .command .build_ext
9
9
import distutils .command .build
10
10
import distutils .command .clean
11
11
@@ -33,6 +33,13 @@ class build(distutils.command.build.build):
33
33
] + distutils .command .build .build .sub_commands
34
34
35
35
36
+ class build_ext (setuptools .command .build_ext .build_ext ):
37
+ def run (self ):
38
+ import numpy
39
+ self .include_dirs .append (numpy .get_include ())
40
+ setuptools .command .build_ext .build_ext .run (self )
41
+
42
+
36
43
class install (setuptools .command .install .install ):
37
44
def run (self ):
38
45
if not self .skip_build :
@@ -48,6 +55,7 @@ def run(self):
48
55
49
56
cmdclass = {
50
57
'build' : build ,
58
+ 'build_ext' : build_ext ,
51
59
'build_deps' : build_deps ,
52
60
'install' : install ,
53
61
'clean' : clean ,
@@ -73,8 +81,7 @@ def run(self):
73
81
link_opts = ['-Wl,-z,now' , '-Wl,-z,noexecstack' ,
74
82
'-Wl,-rpath,' + '$ORIGIN/lib' , '-L' + './external/lib' ]
75
83
76
- includes = [get_include (),
77
- 'ideep4py/include' ,
84
+ includes = ['ideep4py/include' ,
78
85
'ideep4py/include/mkl' ,
79
86
'ideep4py/common' ,
80
87
'ideep4py/include/mm' ,
@@ -138,9 +145,7 @@ def run(self):
138
145
###############################################################################
139
146
140
147
install_requires = [
141
- 'numpy>=1.9.0'
142
- 'protobuf>=3.0.0' ,
143
- 'six>=1.9.0'
148
+ 'numpy>=1.9,<=1.13' ,
144
149
]
145
150
146
151
tests_require = [
0 commit comments