bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)

Check for sys.abiflags before using since not all platforms have it defined.
This commit is contained in:
AraHaan 2019-03-23 12:29:49 -04:00 committed by Cheryl Sabella
parent d3c72a223a
commit a7987e7193
2 changed files with 5 additions and 1 deletions
Misc/NEWS.d/next/Tools-Demos
Tools/freeze

View File

@ -0,0 +1 @@
Fix freeze script on Windows.

View File

@ -217,7 +217,10 @@ def main():
# locations derived from options
version = '%d.%d' % sys.version_info[:2]
flagged_version = version + sys.abiflags
if hasattr(sys, 'abiflags'):
flagged_version = version + sys.abiflags
else:
flagged_version = version
if win:
extensions_c = 'frozen_extensions.c'
if ishome: