Commit 73920237 authored by Steve Dower's avatar Steve Dower

Issue #23970: Fixes bdist_wininst not working on non-Windows platform.

parent d034a5ec
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment