xdg-desktop-portal/fix-test-dependencies.patch
2025-02-12 09:36:01 +00:00

30 lines
1.2 KiB
Diff

From 542d5095b12df6a0ffa667b6d84e5196724c2583 Mon Sep 17 00:00:00 2001
From: Sebastian Wick <sebastian.wick@redhat.com>
Date: Mon, 23 Dec 2024 11:50:31 +0100
Subject: [PATCH] build/tests: Check for python found and version in single
require call
We can only use the python object if it was found and the arguments for
require are all evaluated, even if the resulting feature is disabled.
Fixes: 1c6dd182 ("tests: Check for required WAV decoder for notification tests")
Closes: https://github.com/flatpak/xdg-desktop-portal/issues/1547
---
tests/meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/meson.build b/tests/meson.build
index bbda18512..0196e6a56 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -284,8 +284,7 @@ python = pymod.find_installation(
enable_pytest = get_option('pytest') \
.require(pytest.found()) \
- .require(python.found()) \
- .require(python.language_version().version_compare('>=3.9'),
+ .require(python.found() and python.language_version().version_compare('>=3.9'),
error_message: 'Python version >=3.9 is required') \
.require(umockdev_dep.found()) \
.require(have_wav_parse,