summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-10-24 14:55:15 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-12-17 14:47:18 -0800
commite1164f616db78050b935e85fbc2cdb9f731e1511 (patch)
tree0bd79c4ebc99816a6301de091f770047f04e369b /mesonbuild/modules/python.py
parent7ddd0732c27d97fbf36a96c8c3d6bd81cc28ad0f (diff)
downloadmeson-e1164f616db78050b935e85fbc2cdb9f731e1511.tar.gz
dependencies: Require 'native' be passed in kwargs
This simplifies a bunch of cases, and likely fixes some annoying bugs in cross compile situations where should have been passing this and weren't.
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 96ba1e0f0..23b2aa788 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -170,7 +170,7 @@ class PythonInstallation(_ExternalProgramHolder['PythonExternalProgram']):
new_deps = mesonlib.extract_as_list(kwargs, 'dependencies')
pydep = next((dep for dep in new_deps if isinstance(dep, _PythonDependencyBase)), None)
if pydep is None:
- pydep = self._dependency_method_impl({})
+ pydep = self._dependency_method_impl({'native': kwargs['native']})
if not pydep.found():
raise mesonlib.MesonException('Python dependency not found')
new_deps.append(pydep)
@@ -259,7 +259,7 @@ class PythonInstallation(_ExternalProgramHolder['PythonExternalProgram']):
return '0x{:02x}{:02x}0000'.format(major, minor)
def _dependency_method_impl(self, kwargs: DependencyObjectKWs) -> Dependency:
- for_machine = kwargs.get('native', MachineChoice.HOST)
+ for_machine = kwargs['native']
identifier = get_dep_identifier(self._full_path(), kwargs)
dep = self.interpreter.coredata.deps[for_machine].get(identifier)