[Reproducible-builds] [dh-python] 161/183: add "~" to generated minimum required interpreter versions

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Sep 19 15:30:33 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 de0a9412cb2f1e5709f2a629a5f69323d983f169
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Mon Jan 27 23:48:51 2014 +0100

    add "~" to generated minimum required interpreter versions
---
 debian/changelog    |  2 ++
 dhpython/depends.py | 12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cb56321..d03ea58 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ dh-python (1.20131021-2) UNRELEASED; urgency=low
   * pybuild's distutils build plugin: set install-scripts to /usr/bin by default
   * Test Python 2.7 only in test203 if /usr/bin/python2.6 is missing
     (closes: 727674)
+  * Generate dependencies for minimum required interpreter version that are
+    satisfied by alpha/beta/rc releases (i.e. generate ">= X.Y~")
 
  -- Piotr Ożarowski <piotr at debian.org>  Tue, 05 Nov 2013 22:57:20 +0100
 
diff --git a/dhpython/depends.py b/dhpython/depends.py
index b276e4c..e406fb7 100644
--- a/dhpython/depends.py
+++ b/dhpython/depends.py
@@ -125,7 +125,7 @@ class Dependencies:
                 self.depend(vtpl % minv)
                 minv = maxv = None
             if minv:
-                self.depend("%s (>= %s)" % (tpl_tmp, minv))
+                self.depend("%s (>= %s~)" % (tpl_tmp, minv))
             if maxv:
                 self.depend("%s (<< %s)" % (tpl_tmp, maxv))
 
@@ -135,7 +135,7 @@ class Dependencies:
             minv = sorted_vers[0]
             maxv = sorted_vers[-1]
             if minv <= default(self.impl):
-                self.depend("%s (>= %s)" % (tpl_ma, minv))
+                self.depend("%s (>= %s~)" % (tpl_ma, minv))
             if maxv >= default(self.impl):
                 self.depend("%s (<< %s)" % (tpl_ma, maxv + 1))
 
@@ -146,7 +146,7 @@ class Dependencies:
             maxv = sorted_vers[-1]
             #self.depend('|'.join(vtpl % i for i in stats['ext_vers']))
             if minv <= default(self.impl):
-                self.depend("%s (>= %s)" % (tpl, minv))
+                self.depend("%s (>= %s~)" % (tpl, minv))
             if maxv >= default(self.impl):
                 self.depend("%s (<< %s)" % (tpl, maxv + 1))
 
@@ -175,11 +175,11 @@ class Dependencies:
             extensions = sorted(details.get('ext_vers', set()))
             #self.depend('|'.join(vtpl % i for i in extensions))
             if extensions:
-                self.depend("%s (>= %s)" % (tpl, extensions[0]))
+                self.depend("%s (>= %s~)" % (tpl, extensions[0]))
                 self.depend("%s (<< %s)" % (tpl, extensions[-1] + 1))
             elif details.get('ext_no_version'):
                 # assume unrecognized extension was built for default interpreter version
-                self.depend("%s (>= %s)" % (tpl, default_version))
+                self.depend("%s (>= %s~)" % (tpl, default_version))
                 self.depend("%s (<< %s)" % (tpl, default_version + 1))
 
             if details.get('compile'):
@@ -201,7 +201,7 @@ class Dependencies:
                         self.depend(vtpl % vrange.minver)
                     else:
                         if vrange.minver:  # minimum version specified
-                            self.depend("%s (>= %s)" % (tpl_ma, vrange.minver))
+                            self.depend("%s (>= %s~)" % (tpl_ma, vrange.minver))
                         if vrange.maxver:  # maximum version specified
                             self.depend("%s (<< %s)" % (tpl_ma, vrange.maxver + 1))
 

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