From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 10/10] gnu: Add python-barbicanclient. Date: Fri, 29 Apr 2016 16:21:03 +0200 Message-ID: <1461939663-5936-11-git-send-email-tipecaml@gmail.com> References: <1461939663-5936-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw9Ip-0007EF-Da for guix-devel@gnu.org; Fri, 29 Apr 2016 10:22:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aw9Id-0001Po-8E for guix-devel@gnu.org; Fri, 29 Apr 2016 10:21:49 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:32848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw9Ib-0001IZ-SE for guix-devel@gnu.org; Fri, 29 Apr 2016 10:21:43 -0400 Received: by mail-wm0-x242.google.com with SMTP id r12so5480657wme.0 for ; Fri, 29 Apr 2016 07:21:27 -0700 (PDT) In-Reply-To: <1461939663-5936-1-git-send-email-tipecaml@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/openstack.scm (python-barbicanclient, python2-barbicanclient): New variables. * gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch: New file. * gnu/local.ml: Add it here. --- gnu/local.mk | 1 + gnu/packages/openstack.scm | 47 +++++++++++++++++++++ .../python-barbicanclient-assertItemsEqual.patch | 48 ++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7e65c86..e47aba8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -690,6 +690,7 @@ dist_patch_DATA = \ gnu/packages/patches/pybugz-stty.patch \ gnu/packages/patches/pygpgme-disable-problematic-tests.patch \ gnu/packages/patches/pyqt-configure.patch \ + gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch \ gnu/packages/patches/python-2-deterministic-build-info.patch \ gnu/packages/patches/python-2.7-search-paths.patch \ gnu/packages/patches/python-2.7-source-date-epoch.patch \ diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index d1e1fa0..50fc939 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -644,6 +644,53 @@ handling.") (define-public python2-oslo.utils (package-with-python2 python-oslo.utils)) +(define-public python-barbicanclient + (package + (name "python-barbicanclient") + (version "4.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/93/3f/" + "9ffbb6f7241d300d9a9d3f4aa794efbb1c45f6c5a729c702bec933a399cf/" + "python-barbicanclient-" version ".tar.gz")) + (sha256 + (base32 + "0paxkhsfj9wal4z14caip9kggbaa99ni03cgivi3z138vc6jdbbd")) + (patches (search-patches + ;; testtools.TestCase.assertItemsEqual does not exist in our + ;; version of testtools. Remove this patch once we update + ;;testtools. + "python-barbicanclient-assertItemsEqual.patch")))) + (build-system python-build-system) + (propagated-inputs + `(("python-cliff" ,python-cliff) + ("python-keystoneclient" ,python-keystoneclient) + ("python-oslo.i18n" ,python-oslo.i18n) + ("python-oslo.serialization" ,python-oslo.serialization) + ("python-oslo.utils" ,python-oslo.utils) + ("python-pbr" ,python-pbr) + ("python-requests" ,python-requests) + ("python-six" ,python-six))) + (native-inputs + ;; Tests + `(("python-setuptools" ,python-setuptools) + ("python-mock" ,python-mock) + ("python-requests-mock" ,python-requests-mock) + ("python-testtools" ,python-testtools) + ("python-testrepository" ,python-testrepository))) + (home-page "http://www.openstack.org/") + (synopsis + "Client Library for OpenStack Barbican Key Management API") + (description + "A client and a library for the OpenStack Barbican Key Management +API") + (license asl2.0))) + +(define-public python2-barbicanclient + (package-with-python2 python-barbicanclient)) + (define-public python-keystoneclient (package (name "python-keystoneclient") diff --git a/gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch b/gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch new file mode 100644 index 0000000..43652c4 --- /dev/null +++ b/gnu/packages/patches/python-barbicanclient-assertItemsEqual.patch @@ -0,0 +1,48 @@ +diff --git a/barbicanclient/tests/test_containers.py b/barbicanclient/tests/test_containers.py +index 1327216..0b785a9 100644 +--- a/barbicanclient/tests/test_containers.py ++++ b/barbicanclient/tests/test_containers.py +@@ -17,6 +17,7 @@ import json + + import mock + from oslo_utils import timeutils ++import six + + from barbicanclient import acls + from barbicanclient.tests import test_client +@@ -197,7 +198,7 @@ class WhenTestingContainers(test_client.BaseEntityResource): + container_req = json.loads(self.responses.last_request.text) + self.assertEqual(self.container.name, container_req['name']) + self.assertEqual('certificate', container_req['type']) +- self.assertItemsEqual(self.container.certificate_secret_refs_json, ++ six.assertCountEqual(self, self.container.certificate_secret_refs_json, + container_req['secret_refs']) + + def test_should_store_certificate_via_constructor(self): +@@ -222,7 +223,7 @@ class WhenTestingContainers(test_client.BaseEntityResource): + container_req = json.loads(self.responses.last_request.text) + self.assertEqual(self.container.name, container_req['name']) + self.assertEqual('certificate', container_req['type']) +- self.assertItemsEqual(self.container.certificate_secret_refs_json, ++ six.assertCountEqual(self, self.container.certificate_secret_refs_json, + container_req['secret_refs']) + + def test_should_store_rsa_via_attributes(self): +@@ -246,7 +247,7 @@ class WhenTestingContainers(test_client.BaseEntityResource): + container_req = json.loads(self.responses.last_request.text) + self.assertEqual(self.container.name, container_req['name']) + self.assertEqual('rsa', container_req['type']) +- self.assertItemsEqual(self.container.rsa_secret_refs_json, ++ six.assertCountEqual(self, self.container.rsa_secret_refs_json, + container_req['secret_refs']) + + def test_should_store_rsa_via_constructor(self): +@@ -271,7 +272,7 @@ class WhenTestingContainers(test_client.BaseEntityResource): + container_req = json.loads(self.responses.last_request.text) + self.assertEqual(self.container.name, container_req['name']) + self.assertEqual('rsa', container_req['type']) +- self.assertItemsEqual(self.container.rsa_secret_refs_json, ++ six.assertCountEqual(self, self.container.rsa_secret_refs_json, + container_req['secret_refs']) + + def test_should_get_secret_refs_when_created_using_secret_objects(self): -- 2.6.2