Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions makehelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,27 @@
pass
out = open(sys.argv[1], 'w')

from distutils.sysconfig import get_config_var, get_python_inc
from sysconfig import get_config_var, get_path, get_python_version

incdirs = [get_python_inc()]
incdirs = [get_path("include")]
libdir = get_config_var('LIBDIR') or ''

have_np='NO'
try:
from numpy.distutils.misc_util import get_numpy_include_dirs
incdirs = get_numpy_include_dirs()+incdirs
from numpy import get_include
numpy_dir = [get_include()]
incdirs = numpy_dir+incdirs
have_np='YES'
except ImportError:
pass

print('TARGET_CFLAGS +=',get_config_var('BASECFLAGS'), file=out)
print('TARGET_CXXFLAGS +=',get_config_var('BASECFLAGS'), file=out)

print('PY_VER :=',get_config_var('VERSION'), file=out)
print('PY_VER :=',get_python_version(), file=out)
ldver = get_config_var('LDVERSION')
if ldver is None:
ldver = get_config_var('VERSION')
ldver = get_python_version()
if get_config_var('Py_DEBUG'):
ldver = ldver+'_d'
print('PY_LD_VER :=',ldver, file=out)
Expand Down