From a80e26d57a4e014cdd90253fd91df933b7cf7f38 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 29 Apr 2025 00:42:05 +0100 Subject: [PATCH 1/2] Fix use of ALIAS_WPREFIX in pymanager builds --- PC/layout/support/pymanager.py | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/PC/layout/support/pymanager.py b/PC/layout/support/pymanager.py index b57e41bee51207..8ec0e60470ecf3 100644 --- a/PC/layout/support/pymanager.py +++ b/PC/layout/support/pymanager.py @@ -58,6 +58,7 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False): COMPANY = "PythonEmbed" TARGETW = None ALIAS_PREFIX = None + ALIAS_WPREFIX = None DISPLAY_TAGS.append("embeddable") # Deliberately name the file differently from the existing distro # so we can republish old versions without replacing files. @@ -126,23 +127,24 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False): # Generate alias entries for each target. We need both arch and non-arch # versions as well as windowed/non-windowed versions to make sure that all # necessary aliases are created. - if ALIAS_PREFIX: - for prefix, base in [ - (ALIAS_PREFIX, {"target": TARGET}), - (f"{ALIAS_PREFIX}w", {"target": TARGETW, "windowed": 1}), - ]: - if not base["target"]: - continue - if XY_TAG: - STD_ALIAS.extend([ - {**base, "name": f"{prefix}{XY_TAG}.exe"}, - {**base, "name": f"{prefix}{XY_ARCH_TAG}.exe"}, - ]) - if X_TAG: - STD_ALIAS.extend([ - {**base, "name": f"{prefix}{X_TAG}.exe"}, - {**base, "name": f"{prefix}{X_ARCH_TAG}.exe"}, - ]) + for prefix, base in ( + (ALIAS_PREFIX, {"target": TARGET}), + (ALIAS_WPREFIX, {"target": TARGETW, "windowed": 1}), + ): + if prefix is None: + continue + if not base["target"]: + continue + if XY_TAG: + STD_ALIAS.extend([ + {**base, "name": f"{prefix}{XY_TAG}.exe"}, + {**base, "name": f"{prefix}{XY_ARCH_TAG}.exe"}, + ]) + if X_TAG: + STD_ALIAS.extend([ + {**base, "name": f"{prefix}{X_TAG}.exe"}, + {**base, "name": f"{prefix}{X_ARCH_TAG}.exe"}, + ]) STD_PEP514.append({ "kind": "pep514", From b98b48090440dfa638b97147a709031ef67a8b10 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 29 Apr 2025 09:29:00 +0100 Subject: [PATCH 2/2] Update PC/layout/support/pymanager.py --- PC/layout/support/pymanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PC/layout/support/pymanager.py b/PC/layout/support/pymanager.py index 8ec0e60470ecf3..933d342e99f8fd 100644 --- a/PC/layout/support/pymanager.py +++ b/PC/layout/support/pymanager.py @@ -131,7 +131,7 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False): (ALIAS_PREFIX, {"target": TARGET}), (ALIAS_WPREFIX, {"target": TARGETW, "windowed": 1}), ): - if prefix is None: + if not prefix: continue if not base["target"]: continue