diff options
author | Daniel Jacobs <daniel.jacobs@is4s.com> | 2021-09-30 09:43:08 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-10-10 16:12:57 -0400 |
commit | 31bea202c9dc9d288d787f0073f0e221971669ba (patch) | |
tree | 5d196d27876f2b602ff33e36b120dc2ac269e9c9 /mesonbuild | |
parent | a5020857f31ad6d03bc7c0019551cc28b9e5aad5 (diff) | |
download | meson-31bea202c9dc9d288d787f0073f0e221971669ba.zip meson-31bea202c9dc9d288d787f0073f0e221971669ba.tar.gz meson-31bea202c9dc9d288d787f0073f0e221971669ba.tar.bz2 |
improve wraptool search
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/wrap/wraptool.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wraptool.py b/mesonbuild/wrap/wraptool.py index a6648a7..33af16e 100644 --- a/mesonbuild/wrap/wraptool.py +++ b/mesonbuild/wrap/wraptool.py @@ -70,9 +70,13 @@ def list_projects(options: 'argparse.Namespace') -> None: def search(options: 'argparse.Namespace') -> None: name = options.name releases = get_releases() - for p in releases.keys(): - if p.startswith(name): + for p, info in releases.items(): + if p.find(name) != -1: print(p) + else: + for dep in info.get('dependency_names', []): + if dep.find(name) != -1: + print(f'Dependency {dep} found in wrap {p}') def get_latest_version(name: str) -> tuple: releases = get_releases() |