[Python-checkins] cpython: Issue #23970: Fixes bdist_wininst not working on non-Windows platform.
steve.dower
python-checkins at python.org
Sat May 23 21:16:10 CEST 2015
https://hg.python.org/cpython/rev/32e6123f9f8c
changeset: 96245:32e6123f9f8c
user: Steve Dower <steve.dower at microsoft.com>
date: Sat May 23 12:15:57 2015 -0700
summary:
Issue #23970: Fixes bdist_wininst not working on non-Windows platform.
files:
Lib/distutils/command/bdist_wininst.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -331,8 +331,13 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list