This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.

commit 476b167e4b49da96037713860d5de47cbff76179
Author: Piotr Ożarowski <pi...@debian.org>
Date:   Sat Jun 29 10:30:04 2013 +0200

    customize dpkg -S queries per interpreter implementation
---
 dhpython/pydist.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dhpython/pydist.py b/dhpython/pydist.py
index 0d9c43a..7d03e02 100644
--- a/dhpython/pydist.py
+++ b/dhpython/pydist.py
@@ -65,6 +65,11 @@ OVERRIDES_FILE_NAMES = {
     'cpython3': 'debian/py3dist-overrides',
     'pypy': 'debian/pypydist-overrides',
 }
+DPKG_SEARCH_TPLS = {
+    'cpython2': "*/%s-?*\.egg-info | grep '/python2\../\|/pyshared/'",
+    'cpython3': '*python3/*/{}-?*\.egg-info',
+    'pypy': '*pypy/*/{}-?\.egg-info'
+}
 
 
 def validate(fpath):
@@ -163,7 +168,7 @@ def guess_dependency(impl, req, version=None):
                 return item['dependency']
 
     # try dpkg -S
-    query = "'*python3/*/%s-?*\.egg-info'" % ci_regexp(safe_name(name))  # 
TODO: .dist-info
+    query = DPKG_SEARCH_TPLS[impl].format(ci_regexp(safe_name(name)))
 
     log.debug("invoking dpkg -S %s", query)
     process = Popen("/usr/bin/dpkg -S %s" % query,

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/reproducible/dh-python.git

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to