I will describe here some notes I keep while packaging python modules.
debian/control
- Depends: no need for python-all-dev, if you're not building an extension, otherwise python is enough
- does pycentral require Provides: ${python:Provides} ? if not, please remove it (you can remove it)
debian/rules
if you do things like " PYVERS=$(shell pyversions -r) ; for python in $(PYVERS);... " you need python-all as build-dep isntead of python alone but doing that for all python versions only makes sense if you want to run tests (which doesn;t work due to the broken py.test) or if you build extensions which are writen in C so I'd suggest to stay with python and juse use python setup.py .... so pycentral wil handle that based on the XB-Python-versions thing or so
debian/watch
PyPI is a widely use service for distributing Python module, but it's usually not fit for debian packaging: the tarball hosted there tends to contain only source code, with other important content missing, such as tests, building helpers, documentation sources, etc.
These days, modules are often hosted on github, so my suggestion is to download the tarball from there instead, for example with:
version=4 opts=uversionmangle=s/(\d)(rc|a|b)/$1~$2/ \ https://github.com/<org>/<project>/tags .*/archive/refs/tags/@ANY_VERSION@@ARCHIVE_EXT@