Merge lp:~didrocks/python-distutils-extra/fix-package-detection into lp:python-distutils-extra

Proposed by Didier Roche-Tolomelli
Status: Merged
Merged at revision: not available
Proposed branch: lp:~didrocks/python-distutils-extra/fix-package-detection
Merge into: lp:python-distutils-extra
Diff against target: 14 lines (+3/-1)
1 file modified
debian/local/python-mkdebian (+3/-1)
To merge this branch: bzr merge lp:~didrocks/python-distutils-extra/fix-package-detection
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+14938@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

This fix some bugs like the one encountered in bug #482913 where the module only have one .py file (no directory for the module).

145. By Martin Pitt

python-mkdebian: Fix dependency detection for packages which only ship a
Python module, not a package. Thanks Didier Roche! (LP: #482913)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/local/python-mkdebian'
2--- debian/local/python-mkdebian 2009-09-11 10:33:18 +0000
3+++ debian/local/python-mkdebian 2009-11-17 05:35:17 +0000
4@@ -224,7 +224,9 @@
5 dpkg = subprocess.Popen(['dpkg', '-L', package], stdout=subprocess.PIPE,
6 stderr=subprocess.PIPE)
7 out = dpkg.communicate()[0]
8- if dpkg.returncode == 0 and '/%s/__init__.py\n' % module.replace('.', '/') in out:
9+ if dpkg.returncode == 0 and \
10+ ('/%s/__init__.py\n' % module.replace('.', '/') in out or \
11+ '/%s.py\n' % module.replace('.', '/') in out):
12 return package
13
14 # bigger hammer: dpkg -S for Python packages

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: