Skip to content

gh-132930: Fixes PEP 514 registration for PyManager packages on x64 #133154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions PC/layout/support/pymanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
ID_TAG = XY_ARCH_TAG
# Tag shown in 'py list' output
DISPLAY_TAG = f"{XY_TAG}-dev{TAG_ARCH}" if VER_SUFFIX else XY_ARCH_TAG
# Tag used for PEP 514 registration
SYS_WINVER = XY_TAG + (TAG_ARCH if TAG_ARCH != '-64' else '')

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

STD_PEP514.append({
"kind": "pep514",
"Key": rf"{COMPANY}\{ID_TAG}",
"DisplayName": f"{DISPLAY_NAME} {DISPLAY_VERSION}",
"SupportUrl": "https://www.python.org/",
"SysArchitecture": SYS_ARCH,
"SysVersion": VER_DOT,
"Version": FULL_VERSION,
"InstallPath": {
"_": "%PREFIX%",
"ExecutablePath": f"%PREFIX%{TARGET}",
# WindowedExecutablePath is added below
},
"Help": {
"Online Python Documentation": {
"_": f"https://docs.python.org/{VER_DOT}/"
if SYS_WINVER:
STD_PEP514.append({
"kind": "pep514",
"Key": rf"{COMPANY}\{SYS_WINVER}",
"DisplayName": f"{DISPLAY_NAME} {DISPLAY_VERSION}",
"SupportUrl": "https://www.python.org/",
"SysArchitecture": SYS_ARCH,
"SysVersion": VER_DOT,
"Version": FULL_VERSION,
"InstallPath": {
"_": "%PREFIX%",
"ExecutablePath": f"%PREFIX%{TARGET}",
# WindowedExecutablePath is added below
},
},
})
"Help": {
"Online Python Documentation": {
"_": f"https://docs.python.org/{VER_DOT}/"
},
},
})

STD_START.append({
"kind": "start",
Expand Down
Loading