libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [05/10] libcloud git commit: mock out backports for the setuptools module
Date Sun, 09 Oct 2016 08:50:51 GMT
mock out backports for the setuptools module


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5d7c4377
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5d7c4377
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5d7c4377

Branch: refs/heads/trunk
Commit: 5d7c43774932934bab0ff7ebfab469a09bfa620d
Parents: 2ea10dc
Author: Anthony Shaw <anthonyshaw@apache.org>
Authored: Fri Jun 24 16:30:09 2016 +1000
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Fri Jun 24 16:30:09 2016 +1000

----------------------------------------------------------------------
 setup.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5d7c4377/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index e8cc1bf..2de4048 100644
--- a/setup.py
+++ b/setup.py
@@ -28,8 +28,18 @@ try:
 except ImportError:
     has_epydoc = False
 
-import libcloud.utils
-from libcloud.utils.dist import get_packages, get_data_files
+# Mock out the backports module incase an import is requested.
+class MockBackports:
+    def match_hostname():
+        pass
+
+    def CertificateError():
+        pass
+
+sys.modules['backports.ssl_match_hostname'] = MockBackports
+
+import libcloud.utils  # NOQA
+from libcloud.utils.dist import get_packages, get_data_files  # NOQA
 
 libcloud.utils.SHOW_DEPRECATION_WARNING = False
 


Mime
View raw message