#redirect Python/TransitionToDHPython2 = Converting python-central based package to dh_python2 = == Step by step == * in debian/control: * remove python-central from Build-Depends(-Indep) * bump minimum required python-all (or python or python-all-dev) package version to 2.6.6-3~ (read /usr/share/doc/python/changelog.Debian.gz to check if you need a newer version) * remove XB-Python-Version line(s) * check if debian/*.install and other files need additions. dh_python2 ships the actual files in /usr/share/pyshared, plus the symlinks in /usr/lib/python2.x/*-packages. * if you use CDBS: * bump minimum required cdbs version to `0.4.90~` * Remove the `DEB_PYTHON_SYSTEM` line, e.g. `sed -i -e '/DEB_PYTHON_SYSTEM[[:space:]]*[?:]*=[[:space:]]*pycentral/d' debian/rules` * if any of the modules are in a (Debian binary) package whose name isn't "python-*", set DEB_PYTHON2_MODULE_PACKAGES in debian/rules to the space-separated list of (Debian binary) package names you're building. * if you use dh sequencer: * add "python2" to dh's --with * if you use pure debhelper: * `sed -i -e 's/dh_pycentral/dh_python2/' debian/rules` * remove debian/pyversions file and add X-Python-Version in debian/control instead (see [[http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html#s-specifying_versions|policy]] for syntax, example: ">= 2.5") * XS-Python-Version is still supported, but consider replacing it with X-Python-Version (same syntax, except `current` and `all` keywords are gone). If you don't know what's foo's minimum required Python version, don't add this field and wait for bug report to bump it == Special cases == (This ought to be merged into the python-support page too, and perhaps consolidated with the above.) * Some packages include `/usr/share/pycentral-data/pycentral.mk` for its `sitedir` definition. `py_libdir` from `/usr/share/python/python.mk` serves the same purpose, but note that it includes the `/usr/lib/pythonX.Y/` prefix. * `DH_PYCENTRAL=include-links` can be dropped; dh_python2 does this by default. * Be careful to run a test build! In some cases this reveals new dependencies, because dh_python2 guesses dependencies from `egg-info` metadata, so if that metadata is wrong then new dependencies may appear. Sometimes the correct fix is to fix the metadata; in other cases the path of least resistance may be to use `dh_python2 --no-guessing-deps`. == Backports == * dh_python2 was released with squeeze. Backports to squeeze with these changes should work there too. == Bug and Status Tracking == Bugs: * http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=pycentral-deprecation;users=debian-python@lists.debian.org Packages which Build-Dep on python-central: * [[attachment:all-uniq.txt|Union of all Wheezy and Natty packages]] * [[attachment:natty-wheezy-main-brdeps.txt|Intersection of Wheezy main and Natty main]] * [[attachment:wheezy-main-brdeps.txt|Wheezy main]] * [[attachment:wheezy-main-brdeps-ONLY.txt|In Wheezy main but not Natty main]] * [[attachment:natty-main-brdeps-ONLY.txt|In Natty main but not Wheezy main]] * [[attachment:natty-main-brdeps.txt|Natty main]] == Questions? == * read [[http://alioth.debian.org/scm/loggerhead/pkg-python/python-defaults-debian/annotate/head:/dh_python2.rst|man dh_python2]] * if the question is related to dependencies, read [[http://alioth.debian.org/scm/loggerhead/pkg-python/python-defaults-debian/annotate/head:/pydist/README.PyDist|/usr/share/doc/python-doc/README.PyDist]] * ask on #debian-python IRC channel * ask on debian-python@lists.debian.org mailing list