Hi, Jakub Wilk <jw...@debian.org> writes: > * Gediminas Paulauskas <mene...@pov.lt>, 2012-08-27, 15:53: >>>The current behviour of dh_python2 is IMHO errant. It should either >>>1) translate "setuptools" in requires.txt into dependency on >>>python-setuptools or 2) remove "setuptools" from requires.txt when >>>translating it into dependency on python-pkg-resources. >> >>dh_python2 does 2) for a year already: >> >>python-defaults (2.7.2-2) experimental; urgency=low >> >> [ Piotr Ożarowski ] * dh_python2: >>... >> - remove setuptools from requires.txt (it is replaced with >> python-pkg-resources Debian dependency) ... > > Good point, I forgot about it. A no-change rebuild would fix the > following binary packages: > > python-zc.buildout > python-zope.exceptions > python-zope.interface > > However, zope.exceptions and zope.interface build also python3-* > packages, which would _not_ be fixed by such rebuild.
Indeed. Thanks for pointing that out, Gediminas and Jakub. I have written a patch to make the behavior of dh_python2 consistent with dh_python3 based on [0]. If that patch could be integrated soon, then only a no-change rebuild would be required, otherwise I will add a workaround to those 2 packages for Python 3. Out of curiosity, why is debpython different for python2 and python3 (it may be a silly question but I must admit that I have not followed dh_python3 development)? ;-) Regards, -- Arnaud Fontaine [0] http://anonscm.debian.org/loggerhead/pkg-python/python-defaults-debian/revision/246/debpython/pydist.py
=== modified file 'debpython/pydist.py' --- debpython/pydist.py 2012-06-30 19:24:20 +0000 +++ debpython/pydist.py 2012-08-28 03:01:55 +0000 @@ -181,16 +181,31 @@ ver = None result = [] + modified = optional_section = False + processed = [] with open(fname, 'r', encoding='utf-8') as fp: for line in fp: line = line.strip() - # ignore all optional sections + if not line or line.startswith('#'): + processed.append(line) + continue if line.startswith('['): - break - if line: - dependency = guess_dependency(line, ver) - if dependency: - result.append(dependency) + optional_section = True + if optional_section: + processed.append(line) + continue + dependency = guess_dependency(line, ver) + if dependency: + result.append(dependency) + if 'setuptools' in line.lower(): + modified = True + else: + processed.append(line) + else: + processed.append(line) + if modified: + with open(fname, 'w') as fp: + fp.writelines(i + '\n' for i in processed) return result
pgpapD7bTtt3O.pgp
Description: PGP signature