aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/dependencyfallbacks.py
diff options
context:
space:
mode:
authorThomas Heijligen <src@posteo.de>2021-10-15 11:24:02 +0200
committerXavier Claessens <xclaesse@gmail.com>2021-10-26 09:36:22 -0400
commitecdf192f4642ac777fa2948b3fe8f236a3f4553c (patch)
treeb9e7351e000c39125dc20fcbbcc6820e0380cfc1 /mesonbuild/interpreter/dependencyfallbacks.py
parent67e841720c2f8e05ac6c617566c1272a53b47510 (diff)
downloadmeson-ecdf192f4642ac777fa2948b3fe8f236a3f4553c.zip
meson-ecdf192f4642ac777fa2948b3fe8f236a3f4553c.tar.gz
meson-ecdf192f4642ac777fa2948b3fe8f236a3f4553c.tar.bz2
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
Diffstat (limited to 'mesonbuild/interpreter/dependencyfallbacks.py')
-rw-r--r--mesonbuild/interpreter/dependencyfallbacks.py2
1 files changed, 1 insertions, 1 deletions
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: