Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d93de02

Browse files
bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
Check for sys.abiflags before using since not all platforms have it defined. (cherry picked from commit a7987e7) Co-authored-by: AraHaan <[email protected]>
1 parent 5ab6650 commit d93de02

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix freeze script on Windows.

Tools/freeze/freeze.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ def main():
217217

218218
# locations derived from options
219219
version = '%d.%d' % sys.version_info[:2]
220-
flagged_version = version + sys.abiflags
220+
if hasattr(sys, 'abiflags'):
221+
flagged_version = version + sys.abiflags
222+
else:
223+
flagged_version = version
221224
if win:
222225
extensions_c = 'frozen_extensions.c'
223226
if ishome:

0 commit comments

Comments
 (0)