improve wraptool search

pull/9385/head
Daniel Jacobs 3 years ago committed by Eli Schwartz
parent a5020857f3
commit 31bea202c9
  1. 6
      docs/markdown/Using-wraptool.md
  2. 8
      mesonbuild/wrap/wraptool.py

@ -36,6 +36,12 @@ with the `search` command:
$ meson wrap search jpeg
libjpeg
If a package is not found in the list of wraps, the `search` command
will look in all the wrap dependencies:
$ meson wrap search glib-2.0
Dependency glib-2.0 found in wrap glib
To determine which versions of libjpeg are available to install, issue
the `info` command:

@ -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()

Loading…
Cancel
Save