[Build-common-hackers] Bug#606530: packages build-depending on python-dev should not be built for non-default python version

Matthias Klose doko at debian.org
Thu Dec 9 23:07:36 UTC 2010

Package: debhelper,cdbs
Severity: important

A package which build-depends on python-dev and not python-all-dev should only 
be built with the default python version.

Assume that you introduce a new python version python2.7 as the default, 
python-dev depends on python2.7-dev.  Other build-dependencies of the package 
may still pull in python2.6 or libpython2.6.  Both debhelper and cdbs now try to 
build for the intersection of the installed and requested python versions (which 
only depends on the installed pythonX.Y packages, but not the pythonX.Y-dev 
packages), and then fail to build not finding e.g. headers in the non-default 
pythonX.Y-dev package.

In the past we had the XS-Python-Version: current attribute for this scenario, 
but that was ditched for reasons not entirely understood by me.

Currently both debhelper and cdbs already parse build-dependencies to decide 
whether to build -dbg packages or not.  So maybe this analysis should be 
extended to look for the python-dev b-d, and in this case not to build the 
package for the non-default python version, and only build for all supported 
python versions in the presence of a python-all-dev dependency (or 
python-all-dbg, as this depends on python-all-dev).

This should be addressed before starting a transition to python2.7.

More information about the Build-common-hackers mailing list