Commit fe843483 authored by Zen Fu's avatar Zen Fu
Browse files

[weblate] Improve documentation of dependencies script (tails#17377)

parent 33908a00
#!/usr/bin/env python3
This script reads the dependency tree of a specific version of Weblate and
builds Puppet manifests that declare Debian and Python packages. Extra
requirements are not taken into account when building such dependencies lists.
It accepts a YAML configuration file containing a dict with the following
'skip': A list of packages to be skipped.
'require_pip': A list of packages that must be installed with pip.
'require_debian': A list of packages that must be installed from Debian.
'pip': A dictionary indexed by pip package names in which each item is
itself a dict that may contain a 'url', a 'repo_type', and a list
of additional conditions for the package version to be installed.
usage: [-h] --weblate-version WEBLATE_VERSION
--weblate-repo WEBLATE_REPO
--config-file CONFIG_FILE
optional arguments:
-h, --help show this help message and exit
--weblate-version WEBLATE_VERSION
What Weblate version.
--debian-suite {stretch,buster,bullseye}
Debian suite.
--weblate-repo WEBLATE_REPO
Path to Weblate repository.
--config-file CONFIG_FILE
Path to configuration file.
from bs4 import BeautifulSoup
from operator import attrgetter
from string import Template
......@@ -428,7 +473,7 @@ def main():
except requests.HTTPError:
print(f"Didn't found {} on pypi.")
print(f"Didn't find {} on pypi.")
python_modules = template.substitute(
PIP_DEPENDS="\n ".join(pip_depends),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment