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

This commit is contained in:
Steve Dower 2015-05-23 12:15:57 -07:00
parent 19cfb57f5f
commit c70908558d

View file

@ -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