aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-12-30 13:43:49 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-12-30 20:54:41 +0000
commitca30550e065991f9b2438e2a6fabc64fd2248806 (patch)
treee6d687325bcbd6f35d27e715717e804cb335c419 /mesonbuild/wrap
parent5cbc8f866c78b6d408e8a23c531d3c03ca38f1c7 (diff)
downloadmeson-ca30550e065991f9b2438e2a6fabc64fd2248806.zip
meson-ca30550e065991f9b2438e2a6fabc64fd2248806.tar.gz
meson-ca30550e065991f9b2438e2a6fabc64fd2248806.tar.bz2
Handle uppercase dependency names in wraps.
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 6d2b91a..bb153c5 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -116,8 +116,8 @@ class PackageDefinition:
try:
self.config = configparser.ConfigParser(interpolation=None)
self.config.read(self.filename)
- except configparser.Error:
- raise WrapException('Failed to parse {}'.format(self.basename))
+ except configparser.Error as e:
+ raise WrapException('Failed to parse {}: {}'.format(self.basename, str(e)))
self.parse_wrap_section()
if self.type == 'redirect':
# [wrap-redirect] have a `filename` value pointing to the real wrap
@@ -251,6 +251,9 @@ class Resolver:
self.provided_programs.setdefault(k, v)
def find_dep_provider(self, packagename: str) -> T.Optional[T.Union[str, T.List[str]]]:
+ # Python's ini parser converts all key values to lowercase.
+ # Thus the query name must also be in lower case.
+ packagename = packagename.lower()
# Return value is in the same format as fallback kwarg:
# ['subproject_name', 'variable_name'], or 'subproject_name'.
wrap = self.provided_deps.get(packagename)