From cdbd33a4f592166761e02a2054cecdadaacbef60 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Sun, 8 Dec 2024 19:56:58 -0800 Subject: modules/python: Make sure that all dependency candidates meet interface Because in at least one case it will lack the `log_tried` method. --- mesonbuild/dependencies/python.py | 3 +++ 1 file changed, 3 insertions(+) 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. -- cgit v1.2.3