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 c574b8088df7659a2d73b11b6a698e1583421505
Author: Piotr Ożarowski <pi...@debian.org>
Date:   Tue Sep 17 20:19:10 2013 +0200

    dh_python*: generate :any dependencies to specify range of supported Python 
versions
---
 debian/changelog    |  6 ++++--
 dhpython/depends.py | 32 ++++++++++++--------------------
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a17ac28..7bdf34f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 dh-python (1.20130917-1) unstable; urgency=low
 
-  * dh_python{2,3}: bump minimum required python{,3}:any version to
-    workaround #723586
+  * dh_python{2,3}:
+    - bump minimum required python{,3}:any version to workaround #723586
+    - generate :any dependencies to specify range of supported Python versions
+      (doesn't include extensions case), closes: 723070
 
  -- Piotr Ożarowski <pi...@debian.org>  Tue, 17 Sep 2013 19:29:05 +0200
 
diff --git a/dhpython/depends.py b/dhpython/depends.py
index f75691f..b276e4c 100644
--- a/dhpython/depends.py
+++ b/dhpython/depends.py
@@ -111,21 +111,13 @@ class Dependencies:
         vtpl_ma = self.ipkg_vtpl_ma
         vrange = options.vrange
 
-        # Shebang depends are the only things that get python:any
-        if vrange and stats['shebangs']:
-            minv = vrange.minver
-            # note it's an open interval (i.e. do not add 1 here!):
-            maxv = vrange.maxver
-            if minv == maxv:
-                self.depend(vtpl % minv)
-                minv = maxv = None
-            if minv:
-                self.depend("%s (>= %s)" % (tpl_ma, minv))
-            if maxv:
-                self.depend("%s (<< %s)" % (tpl_ma, maxv))
-
         if vrange and any((stats['compile'], stats['public_vers'],
-                          stats['ext_vers'], stats['ext_no_version'])):
+                           stats['ext_vers'], stats['ext_no_version'],
+                           stats['shebangs'])):
+            if any((stats['compile'], stats['public_vers'], 
stats['shebangs'])):
+                tpl_tmp = tpl_ma
+            else:
+                tpl_tmp = tpl
             minv = vrange.minver
             # note it's an open interval (i.e. do not add 1 here!):
             maxv = vrange.maxver
@@ -133,9 +125,9 @@ class Dependencies:
                 self.depend(vtpl % minv)
                 minv = maxv = None
             if minv:
-                self.depend("%s (>= %s)" % (tpl, minv))
+                self.depend("%s (>= %s)" % (tpl_tmp, minv))
             if maxv:
-                self.depend("%s (<< %s)" % (tpl, maxv))
+                self.depend("%s (<< %s)" % (tpl_tmp, maxv))
 
         if self.impl == 'cpython2' and stats['public_vers']:
             # additional Depends to block python package transitions
@@ -143,9 +135,9 @@ class Dependencies:
             minv = sorted_vers[0]
             maxv = sorted_vers[-1]
             if minv <= default(self.impl):
-                self.depend("%s (>= %s)" % (tpl, minv))
+                self.depend("%s (>= %s)" % (tpl_ma, minv))
             if maxv >= default(self.impl):
-                self.depend("%s (<< %s)" % (tpl, maxv + 1))
+                self.depend("%s (<< %s)" % (tpl_ma, maxv + 1))
 
         if stats['ext_vers']:
             # TODO: what about extensions with stable ABI?
@@ -209,9 +201,9 @@ class Dependencies:
                         self.depend(vtpl % vrange.minver)
                     else:
                         if vrange.minver:  # minimum version specified
-                            self.depend("%s (>= %s)" % (tpl, vrange.minver))
+                            self.depend("%s (>= %s)" % (tpl_ma, vrange.minver))
                         if vrange.maxver:  # maximum version specified
-                            self.depend("%s (<< %s)" % (tpl, vrange.maxver + 
1))
+                            self.depend("%s (<< %s)" % (tpl_ma, vrange.maxver 
+ 1))
 
                 for pattern in options.regexpr or []:
                     args += " -X '%s'" % pattern.replace("'", r"'\''")

-- 
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