Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65A95200B97 for ; Sun, 9 Oct 2016 10:50:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 64527160AC3; Sun, 9 Oct 2016 08:50:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3D85D160AFA for ; Sun, 9 Oct 2016 10:50:49 +0200 (CEST) Received: (qmail 73466 invoked by uid 500); 9 Oct 2016 08:50:48 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 73285 invoked by uid 500); 9 Oct 2016 08:50:48 -0000 Delivered-To: apmail-libcloud-commits@libcloud.apache.org Received: (qmail 73265 invoked by uid 99); 9 Oct 2016 08:50:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2016 08:50:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EAB73E69AB; Sun, 9 Oct 2016 08:50:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anthonyshaw@apache.org To: commits@libcloud.apache.org Date: Sun, 09 Oct 2016 08:50:51 -0000 Message-Id: <8ec70dfebd7744cd8cdd947e558d8859@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/10] libcloud git commit: mock out backports for the setuptools module archived-at: Sun, 09 Oct 2016 08:50:50 -0000 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 Authored: Fri Jun 24 16:30:09 2016 +1000 Committer: Anthony Shaw 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