mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23970: Fixes bdist_wininst not working on non-Windows platform.
This commit is contained in:
parent
19cfb57f5f
commit
c70908558d
1 changed files with 7 additions and 2 deletions
|
@ -331,8 +331,13 @@ class bdist_wininst(Command):
|
|||
bv = 14.0
|
||||
else:
|
||||
# for current version - use authoritative check.
|
||||
from msvcrt import CRT_ASSEMBLY_VERSION
|
||||
bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]))
|
||||
try:
|
||||
from msvcrt import CRT_ASSEMBLY_VERSION
|
||||
except ImportError:
|
||||
# cross-building, so assume the latest version
|
||||
bv = 14.0
|
||||
else:
|
||||
bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]))
|
||||
|
||||
|
||||
# wininst-x.y.exe is in the same directory as this file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue