diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index ed6138a7ee0b..951dec693f64 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -347,7 +347,7 @@ def get_variable(self, *, cmake: T.Optional[str] = None, pkgconfig: T.Optional[s val = self.variables.get(internal, default_value) if val is not None: return val - raise DependencyException(f'Could not get an internal variable and no default provided for {self!r}') + raise DependencyException(f'Could not get an internal variable {internal} and no default provided') def generate_link_whole_dependency(self) -> Dependency: from ..build import SharedLibrary, CustomTarget, CustomTargetIndex diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py index 4a722157ff56..0baec27d41d7 100644 --- a/mesonbuild/dependencies/cmake.py +++ b/mesonbuild/dependencies/cmake.py @@ -637,7 +637,7 @@ def get_variable(self, *, cmake: T.Optional[str] = None, pkgconfig: T.Optional[s return ';'.join(v) if default_value is not None: return default_value - raise DependencyException(f'Could not get cmake variable and no default provided for {self!r}') + raise DependencyException(f'Could not get {self.name} cmake variable {cmake} and no default provided') class CMakeDependencyFactory: diff --git a/mesonbuild/dependencies/configtool.py b/mesonbuild/dependencies/configtool.py index 476f7ad420aa..ea7b33d44955 100644 --- a/mesonbuild/dependencies/configtool.py +++ b/mesonbuild/dependencies/configtool.py @@ -170,4 +170,4 @@ def get_variable(self, *, cmake: T.Optional[str] = None, pkgconfig: T.Optional[s return variable if default_value is not None: return default_value - raise DependencyException(f'Could not get config-tool variable and no default provided for {self!r}') + raise DependencyException(f'Could not get {self.name} variable {configtool} using {self.tool_name} and no default provided') diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index c6e6a5e4f2ca..dba13637ca9d 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -586,4 +586,4 @@ def get_variable(self, *, cmake: T.Optional[str] = None, pkgconfig: T.Optional[s pass if default_value is not None: return default_value - raise DependencyException(f'Could not get pkg-config variable and no default provided for {self!r}') + raise DependencyException(f'Could not get {self.name} pkg-config variable {pkgconfig} and no default provided')