summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-12-08 19:56:58 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-01-28 10:23:32 -0800
commitcdbd33a4f592166761e02a2054cecdadaacbef60 (patch)
treebbd4bb3937d9a43d4068892b8c3258936372414b
parent3a96b8b03a0b20c0ae36fe83b8a9dd78d0d741c8 (diff)
downloadmeson-cdbd33a4f592166761e02a2054cecdadaacbef60.tar.gz
modules/python: Make sure that all dependency candidates meet interface
Because in at least one case it will lack the `log_tried` method.
-rw-r--r--mesonbuild/dependencies/python.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index 326e605d8..c978ad62e 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -417,6 +417,9 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir)
set_env('PKG_CONFIG_PATH', old_pkg_path)
+ # Otherwise this doesn't fulfill the interface requirements
+ wrap_in_pythons_pc_dir.log_tried = PythonPkgConfigDependency.log_tried # type: ignore[attr-defined]
+
candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation))
# We only need to check both, if a python install has a LIBPC. It might point to the wrong location,
# e.g. relocated / cross compilation, but the presence of LIBPC indicates we should definitely look for something.