Package: release.debian.org Severity: normal User: release.debian.org@packages.debian.org Usertags: unblock Please unblock package dh-python Python's "Requires" field can contain module names and hence dh_python2/dh_python3 was generating incorrect dependencies while guessing package name for modules with such requirements. See f.e. https://bugs.launchpad.net/ubuntu/+source/dh-python/+bug/1389283 In 1.20141111-1 upload I changed dh_python* to use pre-generated list of all packages that ship Egg metadata (and not only those with unusual names - this change makes this upload backwards compatible) and disabled guessing for modules not available during build or on the fallback list. In Jessie+1 I will add a code that searches also for modules (unless you think such changes are acceptable for an unblock as well :). "guess_dependency()" is used only in pydist.py and depends.py (both support returning None in this function) The other change in this upload is to set binary package's Multi-Arch to foreign. `debdiff dh-python_1.20141026-1.dsc dh-python_1.20141111-1.dsc | filterdiff -x '*_fallback'` output attached (fallback files contain list of all packages with Egg metadata) unblock dh-python/1.20141111-1
diff -Nru dh-python-1.20141026/debian/changelog dh-python-1.20141111/debian/changelog
--- dh-python-1.20141026/debian/changelog 2014-10-26 23:41:38.000000000 +0100
+++ dh-python-1.20141111/debian/changelog 2014-11-11 21:23:22.000000000 +0100
@@ -1,3 +1,15 @@
+dh-python (1.20141111-1) unstable; urgency=medium
+
+ * Set dh-python's Multi-Arch to "foreign" (closes: 767339)
+ * dist_fallback files now contain list of all packages that provide Egg
+ metadata (i.e. not just packages that don't have sensible name)
+ * dh_python* no longer guesses dependency from requires.txt files nor Requires
+ fields. Dependencies are generated only if given requirement is available
+ in dist_fallback file (generated at dh-python's build time) or if it's
+ available at build time (hint: Build-Depends)
+
+ -- Piotr Ożarowski <piotr@debian.org> Tue, 11 Nov 2014 21:23:20 +0100
+
dh-python (1.20141026-1) unstable; urgency=medium
[ Stefano Rivera ]
diff -Nru dh-python-1.20141026/debian/control dh-python-1.20141111/debian/control
--- dh-python-1.20141026/debian/control 2014-10-26 23:41:17.000000000 +0100
+++ dh-python-1.20141111/debian/control 2014-11-11 15:42:25.000000000 +0100
@@ -14,6 +14,7 @@
Package: dh-python
Architecture: all
+Multi-Arch: foreign
Depends: ${misc:Depends}, ${python3:Depends}
Breaks:
# due to /usr/bin/dh_python3 and debhelper files
diff -Nru dh-python-1.20141026/dhpython/pydist.py dh-python-1.20141111/dhpython/pydist.py
--- dh-python-1.20141026/dhpython/pydist.py 2014-10-26 23:41:41.000000000 +0100
+++ dh-python-1.20141111/dhpython/pydist.py 2014-11-11 21:23:41.000000000 +0100
@@ -117,13 +117,14 @@
def guess_dependency(impl, req, version=None):
- log.debug('trying to guess dependency for %s (python=%s)',
+ log.debug('trying to find dependency for %s (python=%s)',
req, version)
if isinstance(version, str):
version = Version(version)
# some upstreams have weird ideas for distribution name...
name, rest = re.compile('([^!><= \(\)\[]+)(.*)').match(req).groups()
+ # TODO: check stdlib and dist-packaged for name.py and name.so files
req = safe_name(name) + rest
data = load(impl)
@@ -154,7 +155,7 @@
else:
return item['dependency']
- # try dpkg -S
+ # search for Egg metadata file or directory (using dpkg -S)
query = PYDIST_DPKG_SEARCH_TPLS[impl].format(ci_regexp(safe_name(name)))
log.debug("invoking dpkg -S %s", query)
@@ -175,13 +176,13 @@
else:
log.debug('dpkg -S did not find package for %s: %s', name, stderr)
- # fall back to python-distname
pname = sensible_pname(impl, name)
- log.info('Cannot find installed package that provides %s. '
- 'Using %s as package name. Please add "%s correct_package_name" '
- 'line to %s to override it IF this is incorrect.',
- name, pname, safe_name(name), PYDIST_OVERRIDES_FNAMES[impl])
- return pname
+ log.info('Cannot find package that provides %s. '
+ 'Please add package that provides it to Build-Depends or '
+ 'add "%s %s-fixme" line to %s or add proper '
+ ' dependency to Depends by hand and ignore this info.',
+ name, safe_name(name), pname, PYDIST_OVERRIDES_FNAMES[impl])
+ # return pname
def parse_pydep(impl, fname):
diff -Nru dh-python-1.20141026/.gitignore dh-python-1.20141111/.gitignore
--- dh-python-1.20141026/.gitignore 2014-10-26 23:41:41.000000000 +0100
+++ dh-python-1.20141111/.gitignore 2014-11-11 21:23:41.000000000 +0100
@@ -5,6 +5,7 @@
pydist/cache/
*\.1
*\.pyc
+*\.swp
*\.deb
*\.changes
*\.log
diff -Nru dh-python-1.20141026/pydist/cpython2_fallback dh-python-1.20141111/pydist/cpython2_fallback
diff -Nru dh-python-1.20141026/pydist/cpython3_fallback dh-python-1.20141111/pydist/cpython3_fallback
diff -Nru dh-python-1.20141026/pydist/Makefile dh-python-1.20141111/pydist/Makefile
--- dh-python-1.20141026/pydist/Makefile 2014-10-26 23:41:41.000000000 +0100
+++ dh-python-1.20141111/pydist/Makefile 2014-11-11 21:23:41.000000000 +0100
@@ -6,7 +6,7 @@
rm -f README.PyDist.html
dist_fallback:
- python3 ./generate_fallback_list.py --skip-sensible-names
+ python3 ./generate_fallback_list.py
README.PyDist.html: README.PyDist
rst2html $< $@
diff -Nru dh-python-1.20141026/pydist/pypy_fallback dh-python-1.20141111/pydist/pypy_fallback
Attachment:
signature.asc
Description: Digital signature