diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-10-24 09:26:35 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-12-17 14:47:18 -0800 |
| commit | 6f3d0ddd823cc0ac49634c353ebdac403dd4c799 (patch) | |
| tree | 9dff9533e0f84a4f25107d0df487eedf2e8c2e2d /mesonbuild/dependencies/python.py | |
| parent | cd6824aaaec9eb4fd76bfd2ab7e8410f6c571c47 (diff) | |
| download | meson-6f3d0ddd823cc0ac49634c353ebdac403dd4c799.tar.gz | |
dependencies: Pass the `name` to `ExternalDependency` constructor
So we don't create a default name that is overwritten except in the case
of appleframeworks. This allows for some cleanup, including
deleting some initializers that were only setting the name.
Diffstat (limited to 'mesonbuild/dependencies/python.py')
| -rw-r--r-- | mesonbuild/dependencies/python.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index aa2e22c6f..f979e705e 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -457,7 +457,8 @@ class _PythonDependencyBase(_Base): class PythonPkgConfigDependency(PkgConfigDependency, _PythonDependencyBase): - def __init__(self, environment: 'Environment', kwargs: DependencyObjectKWs, + # name is needed for polymorphism + def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs, installation: 'BasicPythonExternalProgram', embed: bool, for_machine: 'MachineChoice'): pkg_embed = '-embed' if embed and mesonlib.version_compare(installation.info['version'], '>=3.8') else '' @@ -579,7 +580,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', if DependencyMethods.PKGCONFIG in methods: if from_installation: - candidates.append(functools.partial(PythonPkgConfigDependency, env, kwargs, installation, embed, for_machine)) + candidates.append(functools.partial(PythonPkgConfigDependency, 'python3', env, kwargs, installation, embed, for_machine)) else: candidates.append(functools.partial(PkgConfigDependency, 'python3', env, kwargs)) |
