You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/10/09 08:50:51 UTC

[05/10] libcloud git commit: mock out backports for the setuptools module

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 <an...@apache.org>
Authored: Fri Jun 24 16:30:09 2016 +1000
Committer: Anthony Shaw <an...@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