BLD: Ensure meson.build has the right version of Python #29997
Merged
+5
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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