mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-08 20:28:57 +00:00
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>
This commit is contained in:
parent
e2fad781ec
commit
25c00ef146
@ -4,7 +4,7 @@ before_script:
|
||||
- >
|
||||
dnf install 'dnf-command(copr)' git libtool make libasan
|
||||
python3 python3-six python3-pyparsing glib-networking
|
||||
python3-devel meson ninja-build gdk-pixbuf2-devel
|
||||
meson ninja-build gdk-pixbuf2-devel
|
||||
-y
|
||||
- dnf copr enable @spice/nightly -y
|
||||
- dnf builddep spice -y
|
||||
|
||||
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user