From 1614ee768ea45ba87d9dc7ad4db2254efe51d0fd Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 27 Jan 2025 10:59:37 +0000
Subject: [PATCH] build: If tests are explicitly enabled, require PyGI

Non-trivial test coverage requires PyGI.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meson.build b/meson.build
index bfea0c4..8251880 100644
--- a/meson.build
+++ b/meson.build
@@ -229,6 +229,11 @@ dbus_run_session = find_program(
     'dbus-run-session',
     required: get_option('tests'),
 )
+gi_dep = py_mod.find_installation(
+    py.full_path(),
+    modules: ['gi'],
+    required: get_option('tests').enabled(),
+)
 
 if dbus_run_session.found()
     subdir('test')
-- 
GitLab