After seeing several developer comments implying that they won't package python software because this has become too complicated, I was hit by the fact python-support had drifted away from its original goal: make the developer's life easier. The initial idea was to simplify
dh_python and make it use something that could automatically handle byte-compilation, without the maintainer even noticing it.
Therefore, with the help of Manoj Srivastava's priceless
work to clarify the policy and of Pierre Habouzit's background work on supervising the transition, I have improved
dh_pysupport to be able to generate correct dependencies. I have also finally added the last missing piece of functionality: private modules needing a specific python version.
This is a necessary step for
Joey Hess' plan to remove
dh_python from debhelper. But the more important thing is, for most packages,
dh_pysupport can now be a drop-in replacement for the old
dh_python. This means that many remaining packages for the transition can be updated with s/dh_python/dh_pysupport/ and a new build-depend.
And, for anyone who's afraid of maintaining a python package because it is too complicated, let me show how to make a simple package using python:
- use the upstream installation system;
- add a build-dependency on python-support 0.4;
- call dh_pysupport in the binary targets.
Yes, that's all. You mean, just like with the old
dh_python, the one that used to work without having to understand anything? Yes, just like this one. Don't add a XS-Python-Version field, it's not needed. Don't add a XB-Python-Version field, it's useless. Don't add a debian/pycompat file, it's deprecated. You can add a debian/pyversions file if the package has requirements on the python version, but it's not needed for many packages.
Of course, packages with binary extensions should build them for all available python versions, but
dh_pysupport handles both cases. Of course, I don't claim it's free from bugs, but bugs can be fixed now there is a good design.
So finally, I can say it again: python packaging is simple. You shouldn't be afraid of it.