Skip to content

Commit

Permalink
Merge pull request #81 from lazka/import-no-error
Browse files Browse the repository at this point in the history
msvc9compiler: Don't raise DistutilsPlatformError on import
  • Loading branch information
jaraco authored Dec 18, 2021
2 parents e63d022 + 7828197 commit dd3376e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distutils/msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ def query_vcvarsall(version, arch="x86"):

# More globals
VERSION = get_build_version()
if VERSION < 8.0:
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
# MACROS = MacroExpander(VERSION)

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

0 comments on commit dd3376e

Please sign in to comment.