diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-01-18 22:09:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-18 22:09:49 (GMT) |
commit | ccf7f05c5d3fdea89d857e775d2c6371f3e15b4a (patch) | |
tree | a777bdd32d62666c9bc5c381d4cbbd7004b0926a /Lib/distutils | |
parent | f31c70b0d65510d6d3235816eb95ef43ba6764bf (diff) | |
download | cpython-ccf7f05c5d3fdea89d857e775d2c6371f3e15b4a.zip cpython-ccf7f05c5d3fdea89d857e775d2c6371f3e15b4a.tar.gz cpython-ccf7f05c5d3fdea89d857e775d2c6371f3e15b4a.tar.bz2 |
[3.6] bpo-32588 Move _distutils_findvs into its own module (GH-5227) (#5228)
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/_msvccompiler.py | 4 | ||||
-rw-r--r-- | Lib/distutils/command/bdist_wininst.py | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py index ef1356b..c9d3c6c 100644 --- a/Lib/distutils/_msvccompiler.py +++ b/Lib/distutils/_msvccompiler.py @@ -56,7 +56,7 @@ def _find_vc2015(): return best_version, best_dir def _find_vc2017(): - import _findvs + import _distutils_findvs import threading best_version = 0, # tuple for full version comparisons @@ -66,7 +66,7 @@ def _find_vc2017(): # initialize COM. all_packages = [] def _getall(): - all_packages.extend(_findvs.findall()) + all_packages.extend(_distutils_findvs.findall()) t = threading.Thread(target=_getall) t.start() t.join() diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py index 83f0073..0871a4f 100644 --- a/Lib/distutils/command/bdist_wininst.py +++ b/Lib/distutils/command/bdist_wininst.py @@ -337,11 +337,10 @@ class bdist_wininst(Command): # cross-building, so assume the latest version bv = '14.0' else: - bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]) - if bv in ('14.11', '14.12'): - # v142, v141 and v140 are binary compatible, - # so keep using the 14.0 stub. - bv = '14.0' + # as far as we know, CRT is binary compatible based on + # the first field, so assume 'x.0' until proven otherwise + major = CRT_ASSEMBLY_VERSION.partition('.')[0] + bv = major + '.0' # wininst-x.y.exe is in the same directory as this file |