BLD: Use the correct Python interpreter when running tempita.py #24971
+0
−0
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.
Backport of #24970.
When a program located by
find_program
is executable directly, meson will execute it. If it is a script, its shebang (#!
) line will control which interpreter is used.tempita.py
specifies a standard shebang line of#!/usr/bin/env python3
, so thatpython3
can be located byPATH
lookup.In cases where
python3
as found in thePATH
is not correct, such as on systems that have multiple copies ofpython3
installed when building numpy for one that is not thepython3
found by searchingPATH
, this interpreter will be wrong. When thepython3
found by this mechanism doesn't have Cython available, it will cause the numpy build to fail.With the executable bit removed from
tempita.py
, meson will scan the script when attempting to execute it, locating the shebang line and substituting the appropriatesys.executable
. See numpy/mesonprograms.py
:179.