Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ae37f3d

Browse filesBrowse files
authored
gh-132930: Fixes PEP 514 registration for PyManager packages on x64 (GH-133154)
1 parent 02cd6d7 commit ae37f3d
Copy full SHA for ae37f3d

File tree

Expand file treeCollapse file tree

1 file changed

+21
-18
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-18
lines changed

‎PC/layout/support/pymanager.py

Copy file name to clipboardExpand all lines: PC/layout/support/pymanager.py
+21-18Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
8282
ID_TAG = XY_ARCH_TAG
8383
# Tag shown in 'py list' output
8484
DISPLAY_TAG = f"{XY_TAG}-dev{TAG_ARCH}" if VER_SUFFIX else XY_ARCH_TAG
85+
# Tag used for PEP 514 registration
86+
SYS_WINVER = XY_TAG + (TAG_ARCH if TAG_ARCH != '-64' else '')
8587

8688
DISPLAY_SUFFIX = ", ".join(i for i in DISPLAY_TAGS if i)
8789
if DISPLAY_SUFFIX:
@@ -146,25 +148,26 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
146148
{**base, "name": f"{prefix}{X_ARCH_TAG}.exe"},
147149
])
148150

149-
STD_PEP514.append({
150-
"kind": "pep514",
151-
"Key": rf"{COMPANY}\{ID_TAG}",
152-
"DisplayName": f"{DISPLAY_NAME} {DISPLAY_VERSION}",
153-
"SupportUrl": "https://www.python.org/",
154-
"SysArchitecture": SYS_ARCH,
155-
"SysVersion": VER_DOT,
156-
"Version": FULL_VERSION,
157-
"InstallPath": {
158-
"_": "%PREFIX%",
159-
"ExecutablePath": f"%PREFIX%{TARGET}",
160-
# WindowedExecutablePath is added below
161-
},
162-
"Help": {
163-
"Online Python Documentation": {
164-
"_": f"https://docs.python.org/{VER_DOT}/"
151+
if SYS_WINVER:
152+
STD_PEP514.append({
153+
"kind": "pep514",
154+
"Key": rf"{COMPANY}\{SYS_WINVER}",
155+
"DisplayName": f"{DISPLAY_NAME} {DISPLAY_VERSION}",
156+
"SupportUrl": "https://www.python.org/",
157+
"SysArchitecture": SYS_ARCH,
158+
"SysVersion": VER_DOT,
159+
"Version": FULL_VERSION,
160+
"InstallPath": {
161+
"_": "%PREFIX%",
162+
"ExecutablePath": f"%PREFIX%{TARGET}",
163+
# WindowedExecutablePath is added below
165164
},
166-
},
167-
})
165+
"Help": {
166+
"Online Python Documentation": {
167+
"_": f"https://docs.python.org/{VER_DOT}/"
168+
},
169+
},
170+
})
168171

169172
STD_START.append({
170173
"kind": "start",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.