[tracker: 1/2] Look for a Python installation with the tap module




commit 8569c99d2926d55419affa6c5269053d5c4dc97a
Author: Daniele Nicolodi <daniele grinta net>
Date:   Sun Apr 18 12:11:49 2021 +0200

    Look for a Python installation with the tap module
    
    When the TAP test protocol is enabled, look for a Python installation
    that has the tap module installed. This uses the 'python' Meson module
    and thus bumping the minimum Meson version to 0.51.

 meson.build                        |  2 +-
 tests/functional-tests/meson.build | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 94368a22c..d37ed4511 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('tracker', 'c', 'vala',
         version: '3.2.0-alpha',
-        meson_version: '>=0.50')
+        meson_version: '>=0.51')
 
 gnome = import('gnome')
 i18n = import('i18n')
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 70130f65e..bef157f4a 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -1,4 +1,13 @@
-python = find_program('python3')
+modules = ['gi']
+
+if get_option('tests_tap_protocol')
+  protocol = 'tap'
+  modules += 'tap'
+else
+  protocol = 'exitcode'
+endif
+
+python = import('python').find_installation('python3', modules: modules)
 
 testconf = configuration_data()
 
@@ -40,12 +49,6 @@ test_env.prepend('LD_LIBRARY_PATH', tracker_sparql_uninstalled_dir)
 test_env.prepend('PYTHONPATH', tracker_uninstalled_testutils_dir)
 test_env.set('TRACKER_FUNCTIONAL_TEST_CONFIG', config_json_full_path)
 
-if get_option('tests_tap_protocol')
-  protocol = 'tap'
-else
-  protocol = 'exitcode'
-endif
-
 foreach test_name: functional_tests
   file = meson.current_source_dir() / '@0@.py'.format(test_name)
   test(test_name, python,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]