Skip to content

Commit 4e6f055

Browse files
committed
more clean up for makehelper.py
1 parent de3328c commit 4e6f055

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

makehelper.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
pass
2727
out = open(sys.argv[1], 'w')
2828

29+
"""
30+
3.2, sysconfig
31+
3.10, sysconfig.get_pathi
32+
3.10.13 distutils is deprecated.
33+
3.12, distutils was removed.
34+
"""
2935
if sys.version_info >= (3,10,):
3036
from sysconfig import get_config_var, get_path
3137
incdirs = [get_path("include")]
@@ -36,13 +42,12 @@
3642
libdir = get_config_var('LIBDIR') or ''
3743

3844
have_np='NO'
45+
"""
46+
Since numpy 1.18, numpy.get_include() exists.
47+
"""
3948
try:
40-
if sys.version_info >= (3,10,):
41-
from numpy import get_include
42-
numpy_dir = [get_include()]
43-
else:
44-
from numpy.distutils.misc_util import get_numpy_include_dirs
45-
numpy_dir = get_numpy_include_dirs()
49+
from numpy import get_include
50+
numpy_dir = [get_include()]
4651
incdirs = numpy_dir+incdirs
4752
have_np='YES'
4853
except ImportError:

0 commit comments

Comments
 (0)