summaryrefslogtreecommitdiffstats
path: root/PC/layout/support/props.py
diff options
context:
space:
mode:
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 4d3b061..b1560b5 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"))