diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-10 10:22:49 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-08-10 10:22:49 -0400 |
| commit | d6d341fc770cfdc354f35d915e92d0e1fc79c1dd (patch) | |
| tree | eb63ca1709be4cc6036f5b690a9f62dc9a1e8939 /setuptools/_distutils | |
| parent | 73d8052e68b92ee67e89b09b495134cdb3398003 (diff) | |
| parent | ba9a3eadaff3b96608129380c0874636772da716 (diff) | |
| download | python-setuptools-git-d6d341fc770cfdc354f35d915e92d0e1fc79c1dd.tar.gz | |
Merge https://github.com/pypa/distutils into distutils-b65aa40
Diffstat (limited to 'setuptools/_distutils')
| -rw-r--r-- | setuptools/_distutils/_msvccompiler.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/_distutils/_msvccompiler.py b/setuptools/_distutils/_msvccompiler.py index 491fe87c..ade80056 100644 --- a/setuptools/_distutils/_msvccompiler.py +++ b/setuptools/_distutils/_msvccompiler.py @@ -222,6 +222,7 @@ class MSVCCompiler(CCompiler): super().__init__(verbose, dry_run, force) # target platform (.plat_name is consistent with 'bdist') self.plat_name = None + self.initialized = False @classmethod def _configure(cls, vc_env): @@ -236,9 +237,8 @@ class MSVCCompiler(CCompiler): return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir] def initialize(self, plat_name=None): - def _repeat_call_error(plat_name=None): - raise AssertionError("repeat initialize not allowed") - self.initialize = _repeat_call_error + # multi-init means we would need to check platform same each time... + assert not self.initialized, "don't init multiple times" if plat_name is None: plat_name = get_platform() # sanity check for platforms to prevent obscure errors later. @@ -314,6 +314,8 @@ class MSVCCompiler(CCompiler): (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug, } + self.initialized = True + # -- Worker methods ------------------------------------------------ def object_filenames(self, source_filenames, strip_dir=0, output_dir=''): |
