Browse Source

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

Check for sys.abiflags before using since not all platforms have it defined.
pull/12519/head
AraHaan 7 years ago
committed by Cheryl Sabella
parent
commit
a7987e7193
  1. 1
      Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst
  2. 5
      Tools/freeze/freeze.py

1
Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst

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

5
Tools/freeze/freeze.py

@ -217,7 +217,10 @@ def main():
# locations derived from options # locations derived from options
version = '%d.%d' % sys.version_info[:2] 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: if win:
extensions_c = 'frozen_extensions.c' extensions_c = 'frozen_extensions.c'
if ishome: if ishome:

Loading…
Cancel
Save