summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kloth <jeremy.kloth@gmail.com>2010-10-04 13:08:05 -0600
committerJeremy Kloth <jeremy.kloth@gmail.com>2010-10-04 13:08:05 -0600
commitb305285c37a257d05b6798e2219c7c24f3eb9ccb (patch)
treec1ef830d0ee665d51c7752e1dc871a642a0cef74
parentd6bae73e394709109cc6e7b2bddf50cef66a602d (diff)
downloaddisutils2-b305285c37a257d05b6798e2219c7c24f3eb9ccb.tar.gz
Updated imports to match new layout
Added test skips as appropriate for MSVC version
-rw-r--r--distutils2/command/build_ext.py2
-rw-r--r--distutils2/tests/test_msvc9compiler.py17
2 files changed, 11 insertions, 8 deletions
diff --git a/distutils2/command/build_ext.py b/distutils2/command/build_ext.py
index e8ec3f8..cb4f691 100644
--- a/distutils2/command/build_ext.py
+++ b/distutils2/command/build_ext.py
@@ -678,7 +678,7 @@ class build_ext(Command):
# 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
index c6d4330..69bfee1 100644
--- a/distutils2/tests/test_msvc9compiler.py
+++ b/distutils2/tests/test_msvc9compiler.py
@@ -68,11 +68,11 @@ class msvc9compilerTestCase(support.TempdirManager,
# 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 @@ class msvc9compilerTestCase(support.TempdirManager,
@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 @@ class msvc9compilerTestCase(support.TempdirManager,
@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')