Log python name when not found

Fixes #11686.
pull/11530/head
Charles Brunet 2 years ago committed by Eli Schwartz
parent 51b9f2f1a5
commit 3b1b1b5fec
  1. 6
      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']

Loading…
Cancel
Save