From 2d31851d3b21f5a377f59fe1c1afa4294ce9167e Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 17 Jan 2017 13:33:34 +0530 Subject: [PATCH] Print pkg-config error when framework dep isn't found Without this, macOS users can't figure out why a particular dependency wasn't found because the pkg-config error message gets masked by the fresh and useless DependencyException. --- mesonbuild/dependencies.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index e11fd5702..e583044c9 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -1443,7 +1443,9 @@ def find_external_dependency(name, environment, kwargs): if mesonlib.is_osx(): fwdep = ExtraFrameworkDependency(name, required) if required and not fwdep.found(): - raise DependencyException('Dependency "%s" not found' % name) + m = 'Dependency {!r} not found, tried Extra Frameworks ' \ + 'and Pkg-Config:\n\n' + str(pkg_exc) + raise DependencyException(m.format(name)) return fwdep if pkg_exc is not None: raise pkg_exc