Situation:
- Requirements for a Python package in
requirements.txt - Dependency versions are pinned (good practice)
- Dependency versions in
requirements.txtshould be kept in sync with equivalent Python packages in Debian stable
Example:
- Python project depends on
tenacity - Latest version of
tenacityon PyPI: 9.0.0 tenacityis in stable repository:python3-tenacity- Version in stable repository:
8.2.1 - Expected in
requirements.txt:tenacity==8.2.1
Problem:
With every new Debian release, I have to manually sync package versions. This is boring and error-prone.
For inspiration, I looked at how large projects approach this. For Odoo, syncing is done manually: https://github.com/odoo/odoo/commit/172bf80de60e373a787c87643efe115e66f43e36
I can't imagine this use-case is very exotic, though, so: is there a generally accepted way to keep pinned versions in requirements.txt in sync with Debian stable?
dh_python3's --requires ensures that requirements in requirements.txt files are automatically added to Depends in debian/control.
Also good to note: I'm using dh_python3 with pybuild (so dh_python3's --requires option ensures dependencies are automatically added to debian/control).