diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-01-26 22:46:15 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2010-01-26 22:46:15 (GMT) |
commit | 92e68af56a2b95627c2220c3e190d7e3c2d4643e (patch) | |
tree | a747d03dd4dac1a4b85eee955e3f965b5f135c72 /Lib/distutils/msvc9compiler.py | |
parent | 0276c7ad0b56024f5373ad8f7edca5d77c58df22 (diff) | |
download | cpython-92e68af56a2b95627c2220c3e190d7e3c2d4643e.zip cpython-92e68af56a2b95627c2220c3e190d7e3c2d4643e.tar.gz cpython-92e68af56a2b95627c2220c3e190d7e3c2d4643e.tar.bz2 |
added local get_platform/set_platform APIs in distutils.sysconfig
Diffstat (limited to 'Lib/distutils/msvc9compiler.py')
-rw-r--r-- | Lib/distutils/msvc9compiler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py index 6ac24f8..41d67fa 100644 --- a/Lib/distutils/msvc9compiler.py +++ b/Lib/distutils/msvc9compiler.py @@ -23,9 +23,9 @@ from distutils.errors import (DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError) from distutils.ccompiler import CCompiler, gen_lib_options from distutils import log -import _winreg +from distutils.util import get_platform -_sysconfig = __import__('sysconfig') +import _winreg RegOpenKeyEx = _winreg.OpenKeyEx RegEnumKey = _winreg.EnumKey @@ -327,7 +327,7 @@ class MSVCCompiler(CCompiler) : # multi-init means we would need to check platform same each time... assert not self.initialized, "don't init multiple times" if plat_name is None: - plat_name = _sysconfig.get_platform() + plat_name = get_platform() # sanity check for platforms to prevent obscure errors later. ok_plats = 'win32', 'win-amd64', 'win-ia64' if plat_name not in ok_plats: @@ -348,12 +348,12 @@ class MSVCCompiler(CCompiler) : # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross # compile use 'x86' (ie, it runs the x86 compiler directly) # No idea how itanium handles this, if at all. - if plat_name == _sysconfig.get_platform() or plat_name == 'win32': + if plat_name == get_platform() or plat_name == 'win32': # native build or cross-compile to win32 plat_spec = PLAT_TO_VCVARS[plat_name] else: # cross compile from win32 -> some 64bit - plat_spec = PLAT_TO_VCVARS[_sysconfig.get_platform()] + '_' + \ + plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \ PLAT_TO_VCVARS[plat_name] vc_env = query_vcvarsall(VERSION, plat_spec) |