[Python-modules-commits] r32637 - in packages/libcloud/trunk/debian (5 files)

asb at users.alioth.debian.org asb at users.alioth.debian.org
Sat May 9 19:41:19 UTC 2015


    Date: Saturday, May 9, 2015 @ 19:41:18
  Author: asb
Revision: 32637

* New upstream release.
* debian/patches/dont_req_backports_with_py3.patch:
 - Don't require the backports.ssl_match_hostname module when
   running the tests under Python 3 as it is not needed.
* debian/control: Build-depend on python-backports.ssl-match-hostname

Added:
  packages/libcloud/trunk/debian/patches/
  packages/libcloud/trunk/debian/patches/dont_req_backports_with_py3.patch
  packages/libcloud/trunk/debian/patches/series
Modified:
  packages/libcloud/trunk/debian/changelog
  packages/libcloud/trunk/debian/control

Modified: packages/libcloud/trunk/debian/changelog
===================================================================
--- packages/libcloud/trunk/debian/changelog	2015-05-09 18:42:50 UTC (rev 32636)
+++ packages/libcloud/trunk/debian/changelog	2015-05-09 19:41:18 UTC (rev 32637)
@@ -1,5 +1,10 @@
-libcloud (0.15.1-2) UNRELEASED; urgency=medium
+libcloud (0.17.0-1) UNRELEASED; urgency=medium
 
+  * New upstream release.
+  * debian/patches/dont_req_backports_with_py3.patch:
+   - Don't require the backports.ssl_match_hostname module when
+     running the tests under Python 3 as it is not needed.
+  * debian/control: Build-depend on python-backports.ssl-match-hostname
   * debian/watch: Use pypi.debian.net redirector.
 
  -- Andrew Starr-Bochicchio <asb at debian.org>  Sat, 09 May 2015 14:42:16 -0400

Modified: packages/libcloud/trunk/debian/control
===================================================================
--- packages/libcloud/trunk/debian/control	2015-05-09 18:42:50 UTC (rev 32636)
+++ packages/libcloud/trunk/debian/control	2015-05-09 19:41:18 UTC (rev 32637)
@@ -14,6 +14,7 @@
                python-mock (>= 0.8.0),
                python-epydoc,
                python-pydoctor,
+               python-backports.ssl-match-hostname,
                python3-all,
                python3-crypto (>= 2.6),
                python3-simplejson,

Added: packages/libcloud/trunk/debian/patches/dont_req_backports_with_py3.patch
===================================================================
--- packages/libcloud/trunk/debian/patches/dont_req_backports_with_py3.patch	                        (rev 0)
+++ packages/libcloud/trunk/debian/patches/dont_req_backports_with_py3.patch	2015-05-09 19:41:18 UTC (rev 32637)
@@ -0,0 +1,87 @@
+Description: Don't require the backports.ssl_match_hostname module when
+ running the tests under Python 3 as it is not needed.
+Bug: https://issues.apache.org/jira/browse/LIBCLOUD-644
+
+--- a/libcloud/httplib_ssl.py
++++ b/libcloud/httplib_ssl.py
+@@ -23,7 +23,10 @@ import ssl
+ import base64
+ import warnings
+ 
+-from backports.ssl_match_hostname import match_hostname, CertificateError
++if sys.version_info >= (3, 2):
++    from ssl import match_hostname, CertificateError
++else:
++    from backports.ssl_match_hostname import match_hostname, CertificateError
+ 
+ import libcloud.security
+ from libcloud.utils.py3 import b
+--- a/setup.py
++++ b/setup.py
+@@ -46,19 +46,20 @@ DOC_TEST_MODULES = ['libcloud.compute.drivers.dummy',
+ 
+ SUPPORTED_VERSIONS = ['2.5', '2.6', '2.7', 'PyPy', '3.x']
+ 
+-TEST_REQUIREMENTS = [
+-    'backports.ssl_match_hostname',
+-    'mock'
+-]
+-
+ if sys.version_info <= (2, 4):
+     version = '.'.join([str(x) for x in sys.version_info[:3]])
+     print('Version ' + version + ' is not supported. Supported versions are ' +
+           ', '.join(SUPPORTED_VERSIONS))
+     sys.exit(1)
+ 
+-# pre-2.6 will need the ssl PyPI package
+-pre_python26 = (sys.version_info[0] == 2 and sys.version_info[1] < 6)
++pre_python26 = sys.version_info[:2] < (2, 6)
++pre_python32 = sys.version_info[:2] < (3, 2)
++
++TEST_REQUIREMENTS = [
++    'mock'
++]
++if pre_python32:
++    TEST_REQUIREMENTS.extend(['backports.ssl_match_hostname'])
+ 
+ 
+ def read_version_string():
+@@ -222,9 +223,11 @@ class CoverageCommand(Command):
+ 
+ forbid_publish()
+ 
+-install_requires = ['backports.ssl_match_hostname']
++install_requires = []
+ if pre_python26:
+     install_requires.extend(['ssl', 'simplejson'])
++if pre_python32:
++    install_requires.extend(['backports.ssl_match_hostname'])
+ 
+ setup(
+     name='apache-libcloud',
+--- a/tox.ini
++++ b/tox.ini
+@@ -29,20 +29,17 @@ deps = backports.ssl_match_hostname
+        lockfile
+ 
+ [testenv:py32]
+-deps = backports.ssl_match_hostname
+-       mock
++deps = mock
+        lockfile
+ 
+ [testenv:py33]
+-deps = backports.ssl_match_hostname
+-       mock
++deps = mock
+        lockfile
+ 
+ [testenv:py34]
+ # At some point we can switch to use the stdlib provided mock module on
+ # Python3.4+
+-deps = backports.ssl_match_hostname
+-       mock
++deps = mock
+        lockfile
+ 
+ [testenv:docs]

Added: packages/libcloud/trunk/debian/patches/series
===================================================================
--- packages/libcloud/trunk/debian/patches/series	                        (rev 0)
+++ packages/libcloud/trunk/debian/patches/series	2015-05-09 19:41:18 UTC (rev 32637)
@@ -0,0 +1 @@
+dont_req_backports_with_py3.patch




More information about the Python-modules-commits mailing list