From 3b1b1b5fec6e80e79570351bcdb8c7c25690ac46 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Fri, 28 Apr 2023 08:31:37 -0400 Subject: Log python name when not found Fixes #11686. --- mesonbuild/modules/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 178f1bd..162f8c5 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -345,7 +345,7 @@ class PythonModule(ExtensionModule): else: mlog.warning(sanitymsg, location=state.current_node) - return NonExistingExternalProgram() + return NonExistingExternalProgram(python.name) @disablerIfNotFound @typed_pos_args('python.find_installation', optargs=[str]) @@ -413,11 +413,11 @@ class PythonModule(ExtensionModule): if not python.found(): if required: raise mesonlib.MesonException('{} not found'.format(name_or_path or 'python')) - return NonExistingExternalProgram() + return NonExistingExternalProgram(python.name) elif missing_modules: if required: raise mesonlib.MesonException('{} is missing modules: {}'.format(name_or_path or 'python', ', '.join(missing_modules))) - return NonExistingExternalProgram() + return NonExistingExternalProgram(python.name) else: python = copy.copy(python) python.pure = kwargs['pure'] -- cgit v1.1