summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <etrunko@redhat.com>2018-07-24 14:10:11 -0300
committerFrediano Ziglio <fziglio@redhat.com>2018-07-25 06:13:06 +0100
commit25c00ef1461ef580d43a582eca71f1eb46ad4947 (patch)
treece85df1eda0f0cbf9cba0acc2d1b4a9ec832dcf2 /meson.build
parente2fad781ec439f3ef9a3590efb5b44f159a05132 (diff)
meson: Fix checking for python
When running with -Dpython-checks=false, the build fails. To fix this, we move the python variable declaration outside of the get_option() block as it will be used for calling the generators. Also removes the unnecessary check for python3-devel. Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 4 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 28e7c29..226d9f4 100644
--- a/meson.build
+++ b/meson.build
@@ -128,11 +128,12 @@ foreach dep : optional_deps
endforeach
# Python
+py_module = import('python3')
+python = py_module.find_python()
+
if get_option('python-checks')
- dependency('python3')
- py_module = import('python3')
- python = py_module.find_python()
foreach module : ['six', 'pyparsing']
+ message('Checking for python module @0@'.format(module))
cmd = run_command(python, '-m', module)
if cmd.returncode() != 0
error('Python module @0@ not found'.format(module))