blob: 2a4389e811bb24a8ddd708176f5c818b35ac1f93 [file] [view] [edit]
## CI Python Dependencies ##
These are the Python tools used by our GitHub Actions workflows. Each `*.in`
file lists the top-level packages (with their versions pinned), and the
corresponding `*.txt` file is a lockfile generated by `pip-compile` (from
[pip-tools][]) with hashes for every package. Workflows install them with:
```
- uses: $/.github/actions/python-deps
with:
name: <name>
python-version: "3.x" # optional, passed to actions/setup-python
```
Renovate keeps these up-to-date. Note that the lockfiles have no environment
markers, so they must be generated using the **oldest** Python version used in
CI so that any dependencies only needed for older Python versions are included.
To regenerate a lockfile by hand (after editing the `*.in` file), run the
following command from this directory:
```
python3 -m piptools compile --generate-hashes --strip-extras --output-file=<name>.txt <name>.in
```
To add a new tool, create `<name>.in` with the pinned top-level package(s),
generate `<name>.txt` as above, and install it in the workflow with the
`python-deps` action as above. Renovate will pick up the new file
automatically.
[pip-tools]: https://github.com/jazzband/pip-tools