Skip to content
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

build-details.json should be installed to different locations for nondebug/debug builds and have distinct base_interpreter values #131372

Open
befeleme opened this issue Mar 17, 2025 · 1 comment
Labels
build The build process and cross-build topic-installation type-bug An unexpected behavior, bug, or error

Comments

@befeleme
Copy link
Contributor

befeleme commented Mar 17, 2025

Bug report

Bug description:

In Fedora, we build Python in 4 variants: debug, optimized, freethreading-debug and freethreading. For all of them builds the base_interpreter value stored in the file build-details.json is the same:

  "base_interpreter": "/usr/bin/python3.14",

I suspect it should reflect the build type and contain the applicable suffix(es): d, t, td.
Because of this line, when we run Python's test suite on an installed python3-debug, the test fails, as you can see e.g. here: https://artifacts.dev.testing-farm.io/0ac8ab69-ed5f-4602-9c01-8c13293aa9b6/

test_base_interpreter (test.test_build_details.CPythonBuildDetailsTests.test_base_interpreter) ... FAIL

======================================================================
FAIL: test_base_interpreter (test.test_build_details.CPythonBuildDetailsTests.test_base_interpreter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.14/test/test_build_details.py", line 124, in test_base_interpreter
    self.assertEqual(os.path.realpath(value), os.path.realpath(sys.executable))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/usr/bin/python3.14' != '/usr/bin/python3.14d'
- /usr/bin/python3.14
+ /usr/bin/python3.14d
?                    +

Another issue is that in both cases, the debug and non-debug files are installed to the same location, resulting in a single rewritten file. In case of our sequential build of 4 Pythons, we end up with just two files. Should they be stored in distinct locations for each build instead?

CPython versions tested on:

3.14

Operating systems tested on:

Linux

@befeleme befeleme added the type-bug An unexpected behavior, bug, or error label Mar 17, 2025
@hugovk
Copy link
Member

hugovk commented Mar 17, 2025

cc @FFY00

@picnixz picnixz added build The build process and cross-build topic-installation labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants