diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-12-05 11:42:50 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-10 20:17:21 +0200 |
commit | fc800a2cb8cb754e55db1b6ede287079d44dc244 (patch) | |
tree | 7c6bdfd3f92594968c7ec6b08485eb99c6e9dbda /mesonbuild/ast/introspection.py | |
parent | 38d3fbca9465e4c89e479be5a98b5085a7f83039 (diff) | |
download | meson-fc800a2cb8cb754e55db1b6ede287079d44dc244.zip meson-fc800a2cb8cb754e55db1b6ede287079d44dc244.tar.gz meson-fc800a2cb8cb754e55db1b6ede287079d44dc244.tar.bz2 |
mintro: Add version key to --scan-dependencies (fixes #6287)
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index eb9517c..709dbac 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -136,11 +136,15 @@ class IntrospectionInterpreter(AstInterpreter): def func_dependency(self, node, args, kwargs): args = self.flatten_args(args) + kwargs = self.flatten_kwargs(kwargs) if not args: return name = args[0] has_fallback = 'fallback' in kwargs required = kwargs.get('required', True) + version = kwargs.get('version', []) + if not isinstance(version, list): + version = [version] condition_level = node.condition_level if hasattr(node, 'condition_level') else 0 if isinstance(required, ElementaryNode): required = required.value @@ -149,9 +153,10 @@ class IntrospectionInterpreter(AstInterpreter): self.dependencies += [{ 'name': name, 'required': required, + 'version': version, 'has_fallback': has_fallback, 'conditional': condition_level > 0, - 'node': node + 'node': node, }] def build_target(self, node, args, kwargs, targetclass): |