]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131372: Include LDVERSION and EXE in base_interpreter value (#142256)
authorKarolina Surma <33810531+befeleme@users.noreply.github.com>
Wed, 10 Dec 2025 12:09:41 +0000 (13:09 +0100)
committerGitHub <noreply@github.com>
Wed, 10 Dec 2025 12:09:41 +0000 (12:09 +0000)
* Include LDVERSION and EXE in base_interpreter value

In Fedora, build-details.json created and installed for python3.14t
contains "/usr/bin/python3.14" as the base_interpreter value.
Create a correct string, taking into account both LDVERSION and EXE
config variables, similarly to how it's defined in altbininstall in Makefile.

* Add news

Signed-off-by: Filipe Laíns <lains@riseup.net>
---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Filipe Laíns <lains@riseup.net>
Misc/NEWS.d/next/Build/2025-12-09-14-23-51.gh-issue-131372.2TAEyz.rst [new file with mode: 0644]
Tools/build/generate-build-details.py

diff --git a/Misc/NEWS.d/next/Build/2025-12-09-14-23-51.gh-issue-131372.2TAEyz.rst b/Misc/NEWS.d/next/Build/2025-12-09-14-23-51.gh-issue-131372.2TAEyz.rst
new file mode 100644 (file)
index 0000000..fd53e8c
--- /dev/null
@@ -0,0 +1,2 @@
+Add ``LDVERSION`` and ``EXE`` to the ``base_interpreter`` value of
+``build-details.json``.
index ed9ab2844d250aa9e5ab5674b4cc431a73e59a8e..8272635bc627d6a70096a46799b419d2c68da7ac 100644 (file)
@@ -48,7 +48,9 @@ def generate_data(schema_version: str) -> collections.defaultdict[str, Any]:
     #data['base_interpreter'] = sys._base_executable
     data['base_interpreter'] = os.path.join(
         sysconfig.get_path('scripts'),
-        'python' + sysconfig.get_config_var('VERSION'),
+        "python"
+        + sysconfig.get_config_var('LDVERSION')
+        + sysconfig.get_config_var('EXE'),
     )
     data['platform'] = sysconfig.get_platform()