diff --git a/makehelper.py b/makehelper.py index ef36d63..4fb7eb1 100644 --- a/makehelper.py +++ b/makehelper.py @@ -26,15 +26,16 @@ 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 @@ -42,10 +43,10 @@ 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)