Skip to content

Commit 208d06f

Browse files
authored
gh-132930: Fix use of ALIAS_WPREFIX in pymanager builds (GH-133120)
1 parent 4d54e9c commit 208d06f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

PC/layout/support/pymanager.py

+19-17
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
5858
COMPANY = "PythonEmbed"
5959
TARGETW = None
6060
ALIAS_PREFIX = None
61+
ALIAS_WPREFIX = None
6162
DISPLAY_TAGS.append("embeddable")
6263
# Deliberately name the file differently from the existing distro
6364
# so we can republish old versions without replacing files.
@@ -126,23 +127,24 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
126127
# Generate alias entries for each target. We need both arch and non-arch
127128
# versions as well as windowed/non-windowed versions to make sure that all
128129
# necessary aliases are created.
129-
if ALIAS_PREFIX:
130-
for prefix, base in [
131-
(ALIAS_PREFIX, {"target": TARGET}),
132-
(f"{ALIAS_PREFIX}w", {"target": TARGETW, "windowed": 1}),
133-
]:
134-
if not base["target"]:
135-
continue
136-
if XY_TAG:
137-
STD_ALIAS.extend([
138-
{**base, "name": f"{prefix}{XY_TAG}.exe"},
139-
{**base, "name": f"{prefix}{XY_ARCH_TAG}.exe"},
140-
])
141-
if X_TAG:
142-
STD_ALIAS.extend([
143-
{**base, "name": f"{prefix}{X_TAG}.exe"},
144-
{**base, "name": f"{prefix}{X_ARCH_TAG}.exe"},
145-
])
130+
for prefix, base in (
131+
(ALIAS_PREFIX, {"target": TARGET}),
132+
(ALIAS_WPREFIX, {"target": TARGETW, "windowed": 1}),
133+
):
134+
if not prefix:
135+
continue
136+
if not base["target"]:
137+
continue
138+
if XY_TAG:
139+
STD_ALIAS.extend([
140+
{**base, "name": f"{prefix}{XY_TAG}.exe"},
141+
{**base, "name": f"{prefix}{XY_ARCH_TAG}.exe"},
142+
])
143+
if X_TAG:
144+
STD_ALIAS.extend([
145+
{**base, "name": f"{prefix}{X_TAG}.exe"},
146+
{**base, "name": f"{prefix}{X_ARCH_TAG}.exe"},
147+
])
146148

147149
STD_PEP514.append({
148150
"kind": "pep514",

0 commit comments

Comments
 (0)