meson: Detect python instead of hard-coding python3

It allows to specify the desired python executable (and version) via
meson's native file if there are multiple versions available.
This commit is contained in:
Heiko Becker 2022-03-21 20:47:02 +01:00 committed by Yu Watanabe
parent 4da5e99a8f
commit 43a5fd98a5

View File

@ -638,7 +638,8 @@ endif
############################################################
if run_command('python3', '-c', 'import jinja2', check : false).returncode() != 0
python = find_program('python3')
if run_command(python, '-c', 'import jinja2', check : false).returncode() != 0
error('python3 jinja2 missing')
endif