tests: Maybe skip introspection tests

If we don't find the python gi module,
skip the introspection test.
This commit is contained in:
Matthias Clasen 2022-12-19 21:18:16 -05:00
parent 5844ecf381
commit db5543e83b
2 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,10 @@ if hasattr(os, 'add_dll_directory'):
if path != '' and os.path.isdir(path):
os.add_dll_directory(path)
import gi
try:
import gi
except ImportError:
sys.exit(77) # skip this test, gi module is not available
gi.require_version('Gtk', '4.0')

View File

@ -1,5 +1,3 @@
py = import('python').find_installation('python3', modules: ['gi'])
env = environment()
env.prepend('GI_TYPELIB_PATH',
project_build_root / 'gtk',