Skip to content
Snippets Groups Projects
Commit 96273706 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

dh_python2: print help message for missing extensions even without --verbose message,

add maintainer scripts if .py files are installed directly into /usr/share/pyshared
parent fa2585c9
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,7 @@ class DebHelper(object):
if exists(fn):
data = open(fn, 'r').read()
else:
data = '#! /bin/sh -e'
data = "#! /bin/sh\nset -e"
for dname, args in values:
cmd = 'if [ "$1" = rtupdate ]; then' +\
"\n\tpyclean %s" % dname +\
......
......@@ -142,13 +142,12 @@ def share(package, stats, options):
versions_without_ext = debsorted(set(pubvers) -\
stats['public_ext'])
if not versions_without_ext:
log.error('extension for python%s is missing',
log.error('extension for python%s is missing. ',
'Build extensions for all supported Python '
'versions (`pyversions -vr`) or adjust '
'X-Python-Version field or pass '
'--no-guessing-versions to dh_python2',
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(3)
srcver = versions_without_ext[0]
if srcver in stats['public_vers']:
......@@ -529,6 +528,7 @@ def main():
if not stats['public_vers'] and exists(pyshared_dir):
create_public_links(pyshared_dir, options.vrange)
stats['public_vers'] = get_requested_versions(options.vrange)
stats['compile'] = True
dependencies = Dependencies(package)
dependencies.parse(stats, options)
......
......@@ -9,6 +9,8 @@ run: clean
check:
test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo.py
test -f debian/python-foo/usr/lib/python2.6/dist-packages/bar/bar.py
grep -q pycompile debian/python-foo/DEBIAN/postinst
grep -q pyclean debian/python-foo/DEBIAN/prerm
clean:
./debian/rules clean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment