diff options
author | John Ericson <git@JohnEricson.me> | 2019-08-02 14:29:40 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-23 17:51:36 +0200 |
commit | 3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08 (patch) | |
tree | 8f0637e630777cc4a5707c16a30c4d980b888371 /mesonbuild/modules | |
parent | f6b0425576640e1613f64503951c7c604b868947 (diff) | |
download | meson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.zip meson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.tar.gz meson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.tar.bz2 |
Fix legacy env var support with cross
Fix #3969
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/python.py | 4 | ||||
-rw-r--r-- | mesonbuild/modules/python3.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/windows.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 3f971f7..a5c58a2 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -19,7 +19,7 @@ import typing as T from pathlib import Path from .. import mesonlib -from ..mesonlib import MesonException +from ..mesonlib import MachineChoice, MesonException from . import ExtensionModule from mesonbuild.modules import ModuleReturnValue from ..interpreterbase import ( @@ -506,7 +506,7 @@ class PythonModule(ExtensionModule): if len(args) > 1: raise InvalidArguments('find_installation takes zero or one positional argument.') - name_or_path = state.environment.binaries.host.lookup_entry('python') + name_or_path = state.environment.lookup_binary_entry(MachineChoice.HOST, 'python') if name_or_path is None and args: name_or_path = args[0] if not isinstance(name_or_path, str): diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py index 46f15f0..97bd5ec 100644 --- a/mesonbuild/modules/python3.py +++ b/mesonbuild/modules/python3.py @@ -48,7 +48,7 @@ class Python3Module(ExtensionModule): @noKwargs def find_python(self, state, args, kwargs): - command = state.environment.binaries.host.lookup_entry('python3') + command = state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, 'python3') if command is not None: py3 = dependencies.ExternalProgram.from_entry('python3', command) else: diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index 8589adc..b3e4983 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -48,7 +48,7 @@ class WindowsModule(ExtensionModule): return self._rescomp # Will try cross / native file and then env var - rescomp = ExternalProgram.from_bin_list(state.environment.binaries[for_machine], 'windres') + rescomp = ExternalProgram.from_bin_list(state.environment, for_machine, 'windres') if not rescomp or not rescomp.found(): comp = self.detect_compiler(state.environment.coredata.compilers[for_machine]) |