From f25a1d1a57b4462bebe766ae06e42adb84543e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Sat, 6 Nov 2010 00:32:30 +0100 Subject: [PATCH] Make the error message about missing extension more clear (and more verbose in --verbose mode) --- debian/changelog | 7 +++++++ dh_python2 | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 16f3fb5..64cda10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-defaults (2.6.6-6) UNRELEASED; urgency=low + + * Make the error message about missing extension more clear + (and more verbose in --verbose mode) + + -- Piotr Ożarowski <piotr@debian.org> Sat, 06 Nov 2010 00:19:39 +0100 + python-defaults (2.6.6-5) experimental; urgency=low * pycompile: if installed Python is requested via -V option, use it even if diff --git a/dh_python2 b/dh_python2 index 5eff827..dda61aa 100755 --- a/dh_python2 +++ b/dh_python2 @@ -142,8 +142,13 @@ def share(package, stats, options): versions_without_ext = debsorted(set(pubvers) -\ stats['public_ext']) if not versions_without_ext: - log.error('you most probably have to build extension ' - 'for python%s.', vrepr(version)) + log.error('extension for python%s is missing', + vrepr(version)) + log.info('possible solutions are: building extensions ' + 'for all supported Python versions ' + '(`pyversions -vr`); ' + 'adjusting X-Python-Version field; ' + 'passing --no-guessing-versions to dh_python2') exit(12) srcver = versions_without_ext[0] if srcver in stats['public_vers']: -- GitLab