From 4d179024f0dd3b6b333dd1ec8376b61dc75f1839 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 16 Dec 2016 23:45:08 +0530 Subject: [PATCH] meson: Don't search for python3 twice --- gst/parse/meson.build | 6 ------ meson.build | 10 ++++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gst/parse/meson.build b/gst/parse/meson.build index 5370397..3b88321 100644 --- a/gst/parse/meson.build +++ b/gst/parse/meson.build @@ -1,11 +1,5 @@ cc = meson.get_compiler('c') -py3 = find_program('python3', required : false) -if not py3.found() - # Maybe 'python' is Python 3 - py3 = find_program('python') -endif - # Find flex, configure lex generator flex_cdata = configuration_data() diff --git a/meson.build b/meson.build index 034c740..d5be4c5 100644 --- a/meson.build +++ b/meson.build @@ -364,6 +364,13 @@ if libtype == 'static' gst_c_args += ['-DGST_STATIC_COMPILATION'] 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 + subdir('gst') subdir('libs') subdir('plugins') @@ -384,5 +391,4 @@ else endif endif -python3 = find_program('python3') -run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') +run_command(py3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")') -- 2.7.4