Converting python-central based package to python-support
Step by step
- replace python-central with python-support in debian/control
sed -i -e 's/DEB_PYTHON_SYSTEM=pycentral/DEB_PYTHON_SYSTEM=pysupport/' debian/rules
sed -i -e 's/dh_pycentral/dh_pysupport/' debian/rules
remove files that python-central forgot about in one of the previous package versions (see #cleaningup)
cleaning up
Lenny's python-central doesn't (552595) remove old files at upgrades, so if your package is already in Lenny, you'll need to remove them in preinst maintainer script. Example:
# TODO: remove this file after releasing Squeeze set -e if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 1.2-3 then pycentral pkgremove python-foo fi #DEBHELPER#
Where 1.2-3 is the first version that uses python-support, and python-foo is the name of your package.
Note
Sometimes pycentral pkgremove package_name is not enough. If list of files provided by your package changed in previous versions, you'll most probably have add these two lines to your preinst script:
rm -rf /usr/lib/python2.4/site-packages/foo rm -rf /usr/lib/python2.5/site-packages/foo
Please make sure no other package is using foo namespace before you do that, though. You can check that with:
apt-file search -x '(packages|pyshared)/foo' -l
Warning
All packages that share the same namespace have to use the same helper tool so f.e. if your package provides foo/bar/baz.{py,so} files (i.e. foo.bar.baz module) - all other packages that use "foo" namespace have to use the same helper tool.
Questions?
Ask on #debian-python IRC channel or debian-python@l.d.o mailing list.