-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
BLD: Ensure meson.build has the right version of Python #29997
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
Conversation
If `python3` is in the path, it might be picked up instead of the one used to build. This is the case on GitHub actions, where cibuildwheel seems to explicitly call the Python (3.11+) it wants, but `python3` is in the hosted tool cache as an older version (3.9) that gets picked by Meson. This matters because we need to run `setuptools_scm` to produce the version, and it may not be installed in the `PATH`-based copy. By specifying the version, Meson should skip the `PATH` option, and choose its final fallback, the interpreter that it is itself running on. While still not guaranteed to be correct everywhere, this should at least work for CI.
As an addendum, it seems like the fallback I was hoping for didn't work (possibly a bug in Meson to fix?) However, adding |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…ersion of Python (cherry picked from commit 440eb61)
Conflict was expected due to the differing Python requirements; backport is #29999. |
PR summary
If
python3
is in the path, it might be picked up instead of the one used to build. This is the case on GitHub actions, where cibuildwheel seems to explicitly call the Python (3.11+) it wants, butpython3
is in the hosted tool cache as an older version (3.9) that gets picked by Meson. This matters because we need to runsetuptools_scm
to produce the version, and it may not be installed in thePATH
-based copy.By specifying the version, Meson should skip the
PATH
option, and choose its final fallback, the interpreter that it is itself running on. While still not guaranteed to be correct everywhere, this should at least work for CI.PR checklist