https://github.com/python/cpython/commit/ae37f3d3c0cc41a68174efd1a665f7baa0804801
commit: ae37f3d3c0cc41a68174efd1a665f7baa0804801
branch: main
author: Steve Dower <steve.do...@python.org>
committer: zooba <steve.do...@microsoft.com>
date: 2025-04-29T16:20:41+01:00
summary:

gh-132930: Fixes PEP 514 registration for PyManager packages on x64 (GH-133154)

files:
M PC/layout/support/pymanager.py

diff --git a/PC/layout/support/pymanager.py b/PC/layout/support/pymanager.py
index 4cf3a5599a7951..3e70284a2be1e4 100644
--- a/PC/layout/support/pymanager.py
+++ b/PC/layout/support/pymanager.py
@@ -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:
@@ -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",

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to