aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 2dba007..693621b 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -131,7 +131,7 @@ class PythonDependency(ExternalDependency):
if self.is_found:
mlog.log('Dependency', mlog.bold(self.name), 'found:', mlog.green('YES ({})'.format(py_lookup_method)))
else:
- mlog.log('Dependency', mlog.bold(self.name), 'found:', mlog.red('NO'))
+ mlog.log('Dependency', mlog.bold(self.name), 'found:', [mlog.red('NO')])
def _find_libpy(self, python_holder, environment):
if python_holder.is_pypy:
@@ -512,8 +512,7 @@ class PythonModule(ExtensionModule):
raise InvalidArguments('find_installation argument must be a string.')
if not name_or_path:
- mlog.log("Using meson's python {}".format(mesonlib.python_command))
- python = ExternalProgram('python3', mesonlib.python_command, silent=True)
+ python = ExternalProgram('python3', mesonlib.python_command)
else:
python = ExternalProgram.from_entry('python3', name_or_path)
@@ -530,6 +529,9 @@ class PythonModule(ExtensionModule):
if not python.found() and name_or_path in ['python2', 'python3']:
python = ExternalProgram('python', silent=True)
+ mlog.log('Program', python.name, 'found:',
+ *[mlog.green('YES'), '({})'.format(' '.join(python.command))] if python.found() else [mlog.red('NO')])
+
if not python.found():
if required:
raise mesonlib.MesonException('{} not found'.format(name_or_path or 'python'))