aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python3.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/python3.py')
-rw-r--r--mesonbuild/modules/python3.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py
index f664632..46f15f0 100644
--- a/mesonbuild/modules/python3.py
+++ b/mesonbuild/modules/python3.py
@@ -48,10 +48,11 @@ class Python3Module(ExtensionModule):
@noKwargs
def find_python(self, state, args, kwargs):
- options = [state.environment.config_info.binaries.get('python3')]
- if not options[0]: # because this would be [None]
- options = ['python3', mesonlib.python_command]
- py3 = dependencies.ExternalProgram(*options, silent=True)
+ command = state.environment.binaries.host.lookup_entry('python3')
+ if command is not None:
+ py3 = dependencies.ExternalProgram.from_entry('python3', command)
+ else:
+ py3 = dependencies.ExternalProgram('python3', mesonlib.python_command, silent=True)
return ModuleReturnValue(py3, [py3])
@noKwargs