[Reproducible-builds] [dh-python] 75/183: Do not translate X-Python{, 3}-Version into Depends if there are no Python files in the package

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Sep 19 15:30:22 UTC 2014


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 914b998526794db327ac1a616bc07c38714b720f
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Fri Aug 9 16:00:00 2013 +0200

    Do not translate X-Python{,3}-Version into Depends if there are no Python files in the package
---
 debian/changelog    | 7 +++++++
 dhpython/depends.py | 4 +++-
 dhpython/fs.py      | 3 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5b830e1..307fa25 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dh-python (1.20130809-1) UNRELEASED; urgency=low
+
+  * Do not translate X-Python{,3}-Version into Depends if there are no Python
+    files in the package
+
+ -- Piotr Ożarowski <piotr at debian.org>  Fri, 09 Aug 2013 15:55:11 +0200
+
 dh-python (1.20130807-1) unstable; urgency=low
 
   * dh_python3: do not add multiarch triplets in python3.2's extensions -
diff --git a/dhpython/depends.py b/dhpython/depends.py
index d0937d0..a9d0ea9 100644
--- a/dhpython/depends.py
+++ b/dhpython/depends.py
@@ -99,7 +99,9 @@ class Dependencies:
         vtpl = self.ipkg_vtpl
         vrange = options.vrange
 
-        if vrange:
+        if vrange and any((stats['compile'], stats['public_vers'],
+                          stats['ext_vers'], stats['ext_no_version'],
+                          stats['shebangs'])):
             minv = vrange.minver
             # note it's an open interval (i.e. do not add 1 here!):
             maxv = vrange.maxver
diff --git a/dhpython/fs.py b/dhpython/fs.py
index e2431c6..57dbf50 100644
--- a/dhpython/fs.py
+++ b/dhpython/fs.py
@@ -118,7 +118,8 @@ class Scan:
                        'public_vers': set(),
                        'private_dirs': {},
                        'compile': False,
-                       'ext_vers': set()}
+                       'ext_vers': set(),
+                       'ext_no_version': set()}
 
         for root, dirs, file_names in os.walk(self.proot):
             if interpreter.should_ignore(root):

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



More information about the Reproducible-builds mailing list