diff --git a/build.py b/build.py index 1ba63f06..144c44b0 100755 --- a/build.py +++ b/build.py @@ -723,9 +723,7 @@ def checkCompiler(quiet=False): # Make sure that the compiler that Python wants to use can be found. # It will terminate if the compiler is not found or other exceptions # are raised. - # setuptools is imported to address https://bugs.python.org/issue23246 cmd = "import distutils.msvc9compiler as msvc; " \ - "import setuptools; " \ "mc = msvc.MSVCCompiler(); " \ "mc.initialize(); " \ "print(mc.cc)" @@ -736,9 +734,7 @@ def checkCompiler(quiet=False): # Now get the environment variables which that compiler needs from # its vcvarsall.bat command and load them into this process's # environment. - # setuptools is imported to address https://bugs.python.org/issue23246 cmd = "import distutils.msvc9compiler as msvc; " \ - "import setuptools; " \ "arch = msvc.PLAT_TO_VCVARS[msvc.get_platform()]; " \ "env = msvc.query_vcvarsall(msvc.VERSION, arch); " \ "print(env)" diff --git a/wscript b/wscript index e73629bd..51754d7b 100644 --- a/wscript +++ b/wscript @@ -74,7 +74,6 @@ def configure(conf): msvc_version = str( distutils.msvc9compiler.get_build_version() ) conf.env['MSVC_VERSIONS'] = ['msvc ' + msvc_version] conf.env['MSVC_TARGETS'] = [conf.options.msvc_arch] - conf.env['NO_MSVC_DETECT'] = 1 conf.load('msvc') else: conf.load('compiler_cc compiler_cxx') @@ -416,8 +415,6 @@ def my_check_python_headers(conf): if env.CC_NAME == "msvc": from distutils.msvccompiler import MSVCCompiler - # setuptools is imported to address https://bugs.python.org/issue23246 - import setuptools dist_compiler = MSVCCompiler() dist_compiler.initialize() env.append_value('CFLAGS_PYEXT', dist_compiler.compile_options)