diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/setup.py | 2 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/gnu.py | 2 | ||||
-rw-r--r-- | numpy/distutils/system_info.py | 15 | ||||
-rw-r--r-- | numpy/distutils/unixccompiler.py | 3 | ||||
-rw-r--r-- | numpy/tests/test_public_api.py | 12 |
5 files changed, 12 insertions, 22 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 71b4a7c0a..a4e49a321 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -9,7 +9,7 @@ from os.path import join from numpy.distutils import log from distutils.dep_util import newer -from distutils.sysconfig import get_config_var +from sysconfig import get_config_var from numpy.compat import npy_load_module from setup_common import * # noqa: F403 diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 7004b5d80..0d9d769c2 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -231,7 +231,7 @@ class GnuFCompiler(FCompiler): def _c_arch_flags(self): """ Return detected arch flags from CFLAGS """ - from distutils import sysconfig + import sysconfig try: cflags = sysconfig.get_config_vars()['CFLAGS'] except KeyError: diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 760bb7d5c..1ba8e701c 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -171,7 +171,7 @@ from configparser import RawConfigParser as ConfigParser from distutils.errors import DistutilsError from distutils.dist import Distribution -import distutils.sysconfig +import sysconfig from numpy.distutils import log from distutils.util import get_platform @@ -187,6 +187,7 @@ import distutils.ccompiler import tempfile import shutil +__all__ = ['system_info'] # Determine number of bits import platform @@ -255,7 +256,7 @@ def libpaths(paths, bits): if sys.platform == 'win32': default_lib_dirs = ['C:\\', - os.path.join(distutils.sysconfig.EXEC_PREFIX, + os.path.join(sysconfig.get_config_var('exec_prefix'), 'libs')] default_runtime_dirs = [] default_include_dirs = [] @@ -2498,13 +2499,13 @@ class _numpy_info(system_info): except AttributeError: pass - include_dirs.append(distutils.sysconfig.get_python_inc( + include_dirs.append(distutils.get_python_inc( prefix=os.sep.join(prefix))) except ImportError: pass - py_incl_dir = distutils.sysconfig.get_python_inc() + py_incl_dir = sysconfig.get_python_inc() include_dirs.append(py_incl_dir) - py_pincl_dir = distutils.sysconfig.get_python_inc(plat_specific=True) + py_pincl_dir = sysconfig.get_python_inc(plat_specific=True) if py_pincl_dir not in include_dirs: include_dirs.append(py_pincl_dir) for d in default_include_dirs: @@ -2631,8 +2632,8 @@ class boost_python_info(system_info): break if not src_dir: return - py_incl_dirs = [distutils.sysconfig.get_python_inc()] - py_pincl_dir = distutils.sysconfig.get_python_inc(plat_specific=True) + py_incl_dirs = [sysconfig.get_python_inc()] + py_pincl_dir = sysconfig.get_python_inc(plat_specific=True) if py_pincl_dir not in py_incl_dirs: py_incl_dirs.append(py_pincl_dir) srcs_dir = os.path.join(src_dir, 'libs', 'python', 'src') diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py index 5f36c439f..9bb7251d8 100644 --- a/numpy/distutils/unixccompiler.py +++ b/numpy/distutils/unixccompiler.py @@ -26,7 +26,8 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts self.compiler_so = ccomp # ensure OPT environment variable is read if 'OPT' in os.environ: - from distutils.sysconfig import get_config_vars + # XXX who uses this? + from sysconfig import get_config_vars opt = " ".join(os.environ['OPT'].split()) gcv_opt = " ".join(get_config_vars('OPT')[0].split()) ccomp_s = " ".join(self.compiler_so) diff --git a/numpy/tests/test_public_api.py b/numpy/tests/test_public_api.py index a1d28af44..21b8b838f 100644 --- a/numpy/tests/test_public_api.py +++ b/numpy/tests/test_public_api.py @@ -356,18 +356,6 @@ def test_all_modules_are_expected(): SKIP_LIST_2 = [ 'numpy.math', 'numpy.distutils.log.sys', - 'numpy.distutils.system_info.copy', - 'numpy.distutils.system_info.distutils', - 'numpy.distutils.system_info.log', - 'numpy.distutils.system_info.os', - 'numpy.distutils.system_info.platform', - 'numpy.distutils.system_info.re', - 'numpy.distutils.system_info.shutil', - 'numpy.distutils.system_info.subprocess', - 'numpy.distutils.system_info.sys', - 'numpy.distutils.system_info.tempfile', - 'numpy.distutils.system_info.textwrap', - 'numpy.distutils.system_info.warnings', 'numpy.doc.constants.re', 'numpy.doc.constants.textwrap', 'numpy.lib.emath', |