• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Constants for generating the layout.
3"""
4
5__author__ = "Steve Dower <steve.dower@python.org>"
6__version__ = "3.8"
7
8import struct
9import sys
10
11VER_MAJOR, VER_MINOR, VER_MICRO, VER_FIELD4 = struct.pack(">i", sys.hexversion)
12VER_FIELD3 = VER_MICRO << 8 | VER_FIELD4
13VER_NAME = {"alpha": "a", "beta": "b", "rc": "rc"}.get(
14    sys.version_info.releaselevel, ""
15)
16VER_SERIAL = sys.version_info.serial if VER_NAME else ""
17VER_DOT = "{}.{}".format(VER_MAJOR, VER_MINOR)
18
19PYTHON_DLL_NAME = "python{}{}.dll".format(VER_MAJOR, VER_MINOR)
20PYTHON_STABLE_DLL_NAME = "python{}.dll".format(VER_MAJOR)
21PYTHON_ZIP_NAME = "python{}{}.zip".format(VER_MAJOR, VER_MINOR)
22PYTHON_PTH_NAME = "python{}{}._pth".format(VER_MAJOR, VER_MINOR)
23
24PYTHON_CHM_NAME = "python{}{}{}{}{}.chm".format(
25    VER_MAJOR, VER_MINOR, VER_MICRO, VER_NAME, VER_SERIAL
26)
27
28IS_X64 = sys.maxsize > 2 ** 32
29