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
"""
update_puppet_dependency_files.py
Description
-----------
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
entries:
'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
-----
usage: update_puppet_dependecy_files.py [-h] --weblate-version WEBLATE_VERSION
--debian-suite
{stretch,buster,bullseye}
--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():
try:
pip_depends.append(dep.puppet_code(via_pip))
except requests.HTTPError:
print(f"Didn't found {dep.name} on pypi.")
print(f"Didn't find {dep.name} 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