From 107f933b528cdaf23c038cbc99f5248c9ca666bd Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Wed, 19 Apr 2023 08:42:49 -0400 Subject: [PATCH] Ensure python fallback has the right version Fixes #11057 --- mesonbuild/modules/python.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 84a76c17c..239c68af7 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -332,7 +332,8 @@ class PythonModule(ExtensionModule): # named python is available and has a compatible version, let's use # it if not python.found() and name_or_path in {'python2', 'python3'}: - python = PythonExternalProgram('python') + tmp_python = ExternalProgram.from_entry(display_name, 'python') + python = PythonExternalProgram(name_or_path, ext_prog=tmp_python) if python.found(): if python.sanity(state):