aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-09-05 19:18:33 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-10 21:02:18 +0300
commit1768b09a12664b8a03ce7c46002b6d0910d48271 (patch)
treee6983cf6b7b448571c85b1622436f98049429c8b
parentbd26c71845497c462d40df97954a9bc96f97a24a (diff)
downloadmeson-1768b09a12664b8a03ce7c46002b6d0910d48271.zip
meson-1768b09a12664b8a03ce7c46002b6d0910d48271.tar.gz
meson-1768b09a12664b8a03ce7c46002b6d0910d48271.tar.bz2
Improve formatting of dependency details
Also use a more consistent format for qmake details, and adjust a test case which relies on the specific output
-rw-r--r--mesonbuild/dependencies/base.py14
-rw-r--r--mesonbuild/dependencies/ui.py2
-rwxr-xr-xrun_unittests.py2
3 files changed, 12 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 633228c..4e417ea 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1413,11 +1413,17 @@ def find_external_dependency(name, env, kwargs):
# if the dependency was found
if d.found():
- info = d.log_info()
- if info:
- info = ', ' + info
+ info = []
+ if d.version:
+ info.append(d.version)
- mlog.log(type_text, mlog.bold(display_name), details + 'found:', mlog.green('YES'), (d.version if d.version else '') + info)
+ log_info = d.log_info()
+ if log_info:
+ info.append('(' + log_info + ')')
+
+ info = ' '.join(info)
+
+ mlog.log(type_text, mlog.bold(display_name), details + 'found:', mlog.green('YES'), info)
return d
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index a60d2ad..b740bc6 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -438,7 +438,7 @@ class QtBaseDependency(ExternalDependency):
return 'modules: ' + module_str
def log_info(self):
- return '`{}`'.format(self.from_text)
+ return '{}'.format(self.from_text)
def log_tried(self):
return self.from_text
diff --git a/run_unittests.py b/run_unittests.py
index d2c9bb1..145d9b5 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3262,7 +3262,7 @@ class LinuxlikeTests(BasePlatformTests):
# Confirm that the dependency was found with qmake
mesonlog = self.get_meson_log()
self.assertRegex('\n'.join(mesonlog),
- r'Dependency qt5 \(modules: Core\) found: YES .*, `(qmake|qmake-qt5)`\n')
+ r'Dependency qt5 \(modules: Core\) found: YES .* \((qmake|qmake-qt5)\)\n')
def _test_soname_impl(self, libpath, install):
if is_cygwin() or is_osx():