summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAraHaan <15173749+AraHaan@users.noreply.github.com>2019-03-23 16:29:49 (GMT)
committerCheryl Sabella <cheryl.sabella@gmail.com>2019-03-23 16:29:49 (GMT)
commita7987e71939fa631296f83861fb376361ddd59ee (patch)
tree2c81e0870505da66b4924a2fdb781e1fdbfe4ef7
parentd3c72a223a5f771f964fc34557c55eb5bfa0f5a0 (diff)
downloadcpython-a7987e71939fa631296f83861fb376361ddd59ee.zip
cpython-a7987e71939fa631296f83861fb376361ddd59ee.tar.gz
cpython-a7987e71939fa631296f83861fb376361ddd59ee.tar.bz2
bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
Check for sys.abiflags before using since not all platforms have it defined.
-rw-r--r--Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst1
-rwxr-xr-xTools/freeze/freeze.py5
2 files changed, 5 insertions, 1 deletions
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
index 0000000..67feb9e
--- /dev/null
+++ b/Misc/NEWS.d/next/Tools-Demos/2017-12-19-20-42-36.bpo-32217.axXcjA.rst
@@ -0,0 +1 @@
+Fix freeze script on Windows.
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index 08d09e7..3ab56fd 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -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: