Skip to content

gh-127146: Fix test_sysconfidata_json in Emscripten #128545

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

Closed
wants to merge 1 commit into from

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Jan 6, 2025

In emscripten, the prefix is different when we build and generate the json file from when we run the test.

The prefix is different when we build from when we run the test.
@hoodmane hoodmane requested a review from FFY00 as a code owner January 6, 2025 12:58
@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Jan 6, 2025
@hoodmane hoodmane requested review from freakboy3742 and removed request for FFY00 January 6, 2025 12:58
@FFY00
Copy link
Member

FFY00 commented Jan 6, 2025

The prefixes should be loaded from the Makefile when cross-compiling, which we detect from _PYTHON_PROJECT_BASE being set, which should be the case in make test.

Does sys.base_prefix ever differ from the Makefile value? I am not entirely sure how the Python "installation" works on Emscripten's virtual file system. Can it be present/mounted/installed(?) on a directory other than the one specified in the Makefile? If so, and if that's where this problem stems from, then this isn't an issue specific to Emscripten, but rather all relocatable installations, which is something this test currently does not account for, but it probably should. If this is the problem, then I'd prefer to fix the underlying issue rather than special-case Emscripten.

@hoodmane
Copy link
Contributor Author

hoodmane commented Jan 6, 2025

I think I found the problem.

@hoodmane hoodmane closed this Jan 6, 2025
@hoodmane
Copy link
Contributor Author

hoodmane commented Jan 6, 2025

Opened #128556 with an actual fix.

@hoodmane hoodmane deleted the sysconfig-test branch January 6, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants