[Python-checkins] distutils2: Updated imports to match new layout
tarek.ziade
python-checkins at python.org
Thu Oct 7 11:06:20 CEST 2010
tarek.ziade pushed 975d00a32da9 to distutils2:
http://hg.python.org/distutils2/rev/975d00a32da9
changeset: 744:975d00a32da9
user: Jeremy Kloth <jeremy.kloth at gmail.com>
date: Mon Oct 04 13:08:05 2010 -0600
summary: Updated imports to match new layout
files: distutils2/command/build_ext.py, distutils2/tests/test_msvc9compiler.py
diff --git a/distutils2/command/build_ext.py b/distutils2/command/build_ext.py
--- a/distutils2/command/build_ext.py
+++ b/distutils2/command/build_ext.py
@@ -678,7 +678,7 @@
# to need it mentioned explicitly, though, so that's what we do.
# Append '_d' to the python import library on debug builds.
if sys.platform == "win32":
- from distutils2.msvccompiler import MSVCCompiler
+ from distutils2.compiler.msvccompiler import MSVCCompiler
if not isinstance(self.compiler_obj, MSVCCompiler):
template = "python%d%d"
if self.debug:
diff --git a/distutils2/tests/test_msvc9compiler.py b/distutils2/tests/test_msvc9compiler.py
--- a/distutils2/tests/test_msvc9compiler.py
+++ b/distutils2/tests/test_msvc9compiler.py
@@ -68,11 +68,11 @@
# makes sure query_vcvarsall throws
# a DistutilsPlatformError if the compiler
# is not found
- from distutils2.msvccompiler import get_build_version
+ from distutils2.compiler.msvccompiler import get_build_version
if get_build_version() < 8.0:
# this test is only for MSVC8.0 or above
return
- from distutils2.msvc9compiler import query_vcvarsall
+ from distutils2.compiler.msvc9compiler import query_vcvarsall
def _find_vcvarsall(version):
return None
@@ -87,12 +87,11 @@
@unittest.skipUnless(sys.platform == "win32", "runs only on win32")
def test_reg_class(self):
- from distutils2.msvccompiler import get_build_version
+ from distutils2.compiler.msvccompiler import get_build_version
if get_build_version() < 8.0:
- # this test is only for MSVC8.0 or above
- return
+ raise unittest.SkipTest("requires MSVC 8.0 or later")
- from distutils2.msvc9compiler import Reg
+ from distutils2.compiler.msvc9compiler import Reg
self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx')
# looking for values that should exist on all
@@ -111,7 +110,11 @@
@unittest.skipUnless(sys.platform == "win32", "runs only on win32")
def test_remove_visual_c_ref(self):
- from distutils2.msvc9compiler import MSVCCompiler
+ from distutils2.compiler.msvccompiler import get_build_version
+ if get_build_version() < 8.0:
+ raise unittest.SkipTest("requires MSVC 8.0 or later")
+
+ from distutils2.compiler.msvc9compiler import MSVCCompiler
tempdir = self.mkdtemp()
manifest = os.path.join(tempdir, 'manifest')
f = open(manifest, 'w')
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list