build: Check for the gi python module
authorEmmanuele Bassi <ebassi@gnome.org>
Sun, 19 Dec 2021 16:06:49 +0000 (16:06 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 19 Dec 2021 16:06:49 +0000 (16:06 +0000)
The introspection tests depend on the pygobject module, but we currently
are not checking if it's available at configuration time, which means we
can get build failures like:

> ModuleNotFoundError: No module named 'gi'

when running the test suite.

testsuite/introspection/meson.build

index 6202fb74467c6307c33654cecb8e3464494d4a67..647150055c8e0dfb76515a0c9023d93b32a6d3d2 100644 (file)
@@ -1,3 +1,4 @@
+py = import('python').find_installation('python3', modules: ['gi'])
 
 test('api',
      find_program('api.py', dirs: meson.current_source_dir()),