aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-08-02 14:29:40 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-23 17:51:36 +0200
commit3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08 (patch)
tree8f0637e630777cc4a5707c16a30c4d980b888371 /mesonbuild/modules/python.py
parentf6b0425576640e1613f64503951c7c604b868947 (diff)
downloadmeson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.zip
meson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.tar.gz
meson-3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08.tar.bz2
Fix legacy env var support with cross
Fix #3969
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 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):