8000 BLD: Use the correct Python interpreter when running tempita.py · numpy/numpy@18278b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18278b1

Browse files
markmentovaicharris
authored andcommitted
BLD: Use the correct Python interpreter when running tempita.py
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 that python3 can be located by PATH lookup. In cases where python3 as found in the PATH is not correct, such as on systems that have multiple copies of python3 installed when building numpy for one that is not the python3 found by searching PATH, this interpreter will be wrong. When the python3 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 appropriate sys.executable. See https://github.com/numpy/meson/blob/22df45a31981874310a78dde0df59a6a7c5ebb29/mesonbuild/programs.py#L179.
1 parent 4649a05 commit 18278b1

File tree

1 file changed

+0
-0
lines changed

1 file changed

+0
-0
lines changed

numpy/_build_utils/tempita.py

100755100644
File mode changed.

0 commit comments

Comments
 (0)
30D0
0