summaryrefslogtreecommitdiffstats
path: root/PC/layout/support/constants.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-12-11 02:52:57 (GMT)
committerGitHub <noreply@github.com>2018-12-11 02:52:57 (GMT)
commit0cd6391fd890368ea1743dac50c366b42f2fd126 (patch)
tree1e2d8fd6c85a08477d3eb4082badd9a50386e63e /PC/layout/support/constants.py
parent1c3de541e64f75046b20cdd27bada1557e550bcd (diff)
downloadcpython-0cd6391fd890368ea1743dac50c366b42f2fd126.zip
cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.gz
cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.bz2
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
Diffstat (limited to 'PC/layout/support/constants.py')
-rw-r--r--PC/layout/support/constants.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/PC/layout/support/constants.py b/PC/layout/support/constants.py
new file mode 100644
index 0000000..88ea410
--- /dev/null
+++ b/PC/layout/support/constants.py
@@ -0,0 +1,28 @@
+"""
+Constants for generating the layout.
+"""
+
+__author__ = "Steve Dower <steve.dower@python.org>"
+__version__ = "3.8"
+
+import struct
+import sys
+
+VER_MAJOR, VER_MINOR, VER_MICRO, VER_FIELD4 = struct.pack(">i", sys.hexversion)
+VER_FIELD3 = VER_MICRO << 8 | VER_FIELD4
+VER_NAME = {"alpha": "a", "beta": "b", "rc": "rc"}.get(
+ sys.version_info.releaselevel, ""
+)
+VER_SERIAL = sys.version_info.serial if VER_NAME else ""
+VER_DOT = "{}.{}".format(VER_MAJOR, VER_MINOR)
+
+PYTHON_DLL_NAME = "python{}{}.dll".format(VER_MAJOR, VER_MINOR)
+PYTHON_STABLE_DLL_NAME = "python{}.dll".format(VER_MAJOR)
+PYTHON_ZIP_NAME = "python{}{}.zip".format(VER_MAJOR, VER_MINOR)
+PYTHON_PTH_NAME = "python{}{}._pth".format(VER_MAJOR, VER_MINOR)
+
+PYTHON_CHM_NAME = "python{}{}{}{}{}.chm".format(
+ VER_MAJOR, VER_MINOR, VER_MICRO, VER_NAME, VER_SERIAL
+)
+
+IS_X64 = sys.maxsize > 2 ** 32