diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-10-28 15:04:32 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-11-02 14:24:08 -0400 |
commit | c8d125653d0535624741c591397a2b9b4ae3bb43 (patch) | |
tree | b78f33ff499ba351d2a9c770cc36453c899b01c9 /mesonbuild/modules/python.py | |
parent | 98a9cc079cc59fa932ee002ca61abc8588d60512 (diff) | |
download | meson-c8d125653d0535624741c591397a2b9b4ae3bb43.zip meson-c8d125653d0535624741c591397a2b9b4ae3bb43.tar.gz meson-c8d125653d0535624741c591397a2b9b4ae3bb43.tar.bz2 |
python.dependency(): Do not stop when first candidate is not found
It has to lookup the dependency with required=False otherwise it raises
an exception when the first candidate (pkg-config) failed.
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r-- | mesonbuild/modules/python.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index f183177..18fe926 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -500,11 +500,12 @@ class PythonInstallation(ExternalProgramHolder): if disabled: mlog.log('Dependency', mlog.bold('python'), 'skipped: feature', mlog.bold(feature), 'disabled') else: + new_kwargs = kwargs.copy() + new_kwargs['required'] = False + methods = process_method_kw({DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM}, kwargs) for d in python_factory(self.interpreter.environment, MachineChoice.BUILD if kwargs.get('native', False) else MachineChoice.HOST, - kwargs, - process_method_kw({DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM}, kwargs), - self): + new_kwargs, methods, self): dep = d() if dep.found(): break |