summaryrefslogtreecommitdiff
path: root/PC/layout/support/props.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-11-20 09:30:47 -0800
committerGitHub <noreply@github.com>2019-11-20 09:30:47 -0800
commitde148f263fba75cd10d2cb010fe9c495cee4ec83 (patch)
tree7559853c00252bb9e300e6815ee3615a90e3973b /PC/layout/support/props.py
parentabce2d9bc6b990831d303f4cf9f2de8a6712a1fc (diff)
downloadcpython-git-de148f263fba75cd10d2cb010fe9c495cee4ec83.tar.gz
bpo-33125: Add support for building and releasing Windows ARM64 packages (GH-16828)
Note that the support is not actually enabled yet, and so we won't be publishing these packages. However, for those who want to build it themselves (even by reusing the Azure Pipelines definition), it's now relatively easy to enable.
Diffstat (limited to 'PC/layout/support/props.py')
-rw-r--r--PC/layout/support/props.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/PC/layout/support/props.py b/PC/layout/support/props.py
index 4d3b06195f..b1560b5244 100644
--- a/PC/layout/support/props.py
+++ b/PC/layout/support/props.py
@@ -18,15 +18,9 @@ PROPS_DATA = {
}
if not PROPS_DATA["PYTHON_VERSION"]:
- if VER_NAME:
- PROPS_DATA["PYTHON_VERSION"] = "{}.{}-{}{}".format(
- VER_DOT, VER_MICRO, VER_NAME, VER_SERIAL
- )
- else:
- PROPS_DATA["PYTHON_VERSION"] = "{}.{}".format(VER_DOT, VER_MICRO)
-
-if not PROPS_DATA["PYTHON_PLATFORM"]:
- PROPS_DATA["PYTHON_PLATFORM"] = "x64" if IS_X64 else "Win32"
+ PROPS_DATA["PYTHON_VERSION"] = "{}.{}{}{}".format(
+ VER_DOT, VER_MICRO, "-" if VER_SUFFIX else "", VER_SUFFIX
+ )
PROPS_DATA["PYTHON_TARGET"] = "_GetPythonRuntimeFilesDependsOn{}{}_{}".format(
VER_MAJOR, VER_MINOR, PROPS_DATA["PYTHON_PLATFORM"]
@@ -94,5 +88,13 @@ PROPS_TEMPLATE = r"""<?xml version="1.0" encoding="utf-8"?>
def get_props_layout(ns):
if ns.include_all or ns.include_props:
# TODO: Filter contents of props file according to included/excluded items
- props = PROPS_TEMPLATE.format_map(PROPS_DATA)
+ d = dict(PROPS_DATA)
+ if not d.get("PYTHON_PLATFORM"):
+ d["PYTHON_PLATFORM"] = {
+ "win32": "Win32",
+ "amd64": "X64",
+ "arm32": "ARM",
+ "arm64": "ARM64",
+ }[ns.arch]
+ props = PROPS_TEMPLATE.format_map(d)
yield "python.props", ("python.props", props.encode("utf-8"))