From ecdf192f4642ac777fa2948b3fe8f236a3f4553c Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Fri, 15 Oct 2021 11:24:02 +0200 Subject: dep.name(): return dependency name even if dependency is not found The dep.name() function schould always return the name of the dependency as documented. No matter if it was found or not. https://mesonbuild.com/Reference-manual_returned_dep.html#depfound --- mesonbuild/interpreter/dependencyfallbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/interpreter') diff --git a/mesonbuild/interpreter/dependencyfallbacks.py b/mesonbuild/interpreter/dependencyfallbacks.py index 7d3a7d8..417c8cd 100644 --- a/mesonbuild/interpreter/dependencyfallbacks.py +++ b/mesonbuild/interpreter/dependencyfallbacks.py @@ -270,7 +270,7 @@ class DependencyFallbacksHolder(MesonInterpreterObject): FeatureNew.single_use('OpenMP Dependency', '0.46.0', self.subproject) def _notfound_dependency(self) -> NotFoundDependency: - return NotFoundDependency(self.environment) + return NotFoundDependency(self.names[0] if self.names else '', self.environment) @staticmethod def _check_version(wanted: T.Optional[str], found: str) -> bool: -- cgit v1.1