Skip to content

Commit dd3376e

Browse files
authored
Merge pull request #81 from lazka/import-no-error
msvc9compiler: Don't raise DistutilsPlatformError on import
2 parents e63d022 + 7828197 commit dd3376e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distutils/msvc9compiler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,6 @@ def query_vcvarsall(version, arch="x86"):
291291

292292
# More globals
293293
VERSION = get_build_version()
294-
if VERSION < 8.0:
295-
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
296294
# MACROS = MacroExpander(VERSION)
297295

298296
class MSVCCompiler(CCompiler) :
@@ -339,6 +337,8 @@ def __init__(self, verbose=0, dry_run=0, force=0):
339337
def initialize(self, plat_name=None):
340338
# multi-init means we would need to check platform same each time...
341339
assert not self.initialized, "don't init multiple times"
340+
if self.__version < 8.0:
341+
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % self.__version)
342342
if plat_name is None:
343343
plat_name = get_platform()
344344
# sanity check for platforms to prevent obscure errors later.

0 commit comments

Comments
 (0)