diff --git a/gst/parse/meson.build b/gst/parse/meson.build index 3ce681dee5..9ecf0ab2c9 100644 --- a/gst/parse/meson.build +++ b/gst/parse/meson.build @@ -72,12 +72,12 @@ gen_grammar = configure_file(input : 'gen_grammar.py.in', parser = custom_target('parselex', input : 'parse.l', output : ['lex.priv_gst_parse_yy.c', 'parse_lex.h'], - command : [py3, gen_lex, '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', 'DUMMY'] + command : [python3, gen_lex, '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', 'DUMMY'] ) grammar = custom_target('parsegrammar', input : 'grammar.y', output : ['grammar.tab.c', 'grammar.tab.h'], - command : [py3, gen_grammar, '@OUTPUT0@', '@OUTPUT1@', '@INPUT@'], + command : [python3, gen_grammar, '@OUTPUT0@', '@OUTPUT1@', '@INPUT@'], depends : [parser], ) diff --git a/meson.build b/meson.build index 6fa2df08a7..8f4dc2c729 100644 --- a/meson.build +++ b/meson.build @@ -385,11 +385,7 @@ if libtype == 'static' endif # Used in gst/parse/meson.build and below -py3 = find_program('python3', required : false) -if not py3.found() - # Maybe 'python' is Python 3 - py3 = find_program('python') -endif +python3 = import('python3').find_python() bashcomp_dep = dependency('bash-completion', version : '>= 2.0', required : false) @@ -449,6 +445,6 @@ else endif endif -run_command(py3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') +run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') install_data('gst-element-check-1.0.m4', install_dir : join_paths(get_option('datadir'), 'aclocal'))