]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 23 Mar 2019 16:47:40 +0000 (09:47 -0700)
committerGitHub <noreply@github.com>
Sat, 23 Mar 2019 16:47:40 +0000 (09:47 -0700)
Check for sys.abiflags before using since not all platforms have it defined.
(cherry picked from commit a7987e71939fa631296f83861fb376361ddd59ee)

Co-authored-by: AraHaan <15173749+AraHaan@users.noreply.github.com>
Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst [new file with mode: 0644]
Tools/freeze/freeze.py

diff --git a/Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst b/Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst
new file mode 100644 (file)
index 0000000..67feb9e
--- /dev/null
@@ -0,0 +1 @@
+Fix freeze script on Windows.
index d602f58539753474753c1f911ae417905966d118..a09bfa8abb0f4fde260a81c9491952a29372e28f 100755 (executable)
@@ -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: