Index: Lib/distutils/tests/test_msvc9compiler.py =================================================================== --- Lib/distutils/tests/test_msvc9compiler.py (revision 68372) +++ Lib/distutils/tests/test_msvc9compiler.py (working copy) @@ -13,7 +13,11 @@ if sys.platform != 'win32': # this test is only for win32 return - from distutils.msvc9compiler import query_vcvarsall + try: + from distutils.msvc9compiler import query_vcvarsall + except DistutilsPlatformError: + # this test is for MSVC7 or above + return def _find_vcvarsall(version): return None