]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Detect python instead of hard-coding python3
authorHeiko Becker <heirecka@exherbo.org>
Mon, 21 Mar 2022 19:47:02 +0000 (20:47 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Mar 2022 13:15:23 +0000 (22:15 +0900)
It allows to specify the desired python executable (and version) via
meson's native file if there are multiple versions available.

meson.build

index 7de1baaf70a95d571d1c9a406f1ae02f252e72ea..7babab13635dffbd008ce40e3b2734eed5eb714b 100644 (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