From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 09/10] gnu: Add python-cliff. Date: Fri, 29 Apr 2016 16:21:02 +0200 Message-ID: <1461939663-5936-10-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]:57733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw9Io-0007Cn-2J for guix-devel@gnu.org; Fri, 29 Apr 2016 10:22:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aw9Ic-0001PO-6R for guix-devel@gnu.org; Fri, 29 Apr 2016 10:21:48 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw9Ia-0001IH-Qk for guix-devel@gnu.org; Fri, 29 Apr 2016 10:21:42 -0400 Received: by mail-wm0-x242.google.com with SMTP id w143so5415088wmw.3 for ; Fri, 29 Apr 2016 07:21:26 -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-cliff, python2-cliff): New variables. * gnu/packages/patches/python-cliff-remove-unicodecsv.patch: New file. * gnu/local.mk: Add it here. --- gnu/local.mk | 1 + gnu/packages/openstack.scm | 50 ++++++++++++++++++++++ .../patches/python-cliff-remove-unicodecsv.patch | 11 +++++ 3 files changed, 62 insertions(+) create mode 100644 gnu/packages/patches/python-cliff-remove-unicodecsv.patch diff --git a/gnu/local.mk b/gnu/local.mk index cf3df7d..7e65c86 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -700,6 +700,7 @@ dist_patch_DATA = \ gnu/packages/patches/python-ipython-inputhook-ctype.patch \ gnu/packages/patches/python-rarfile-fix-tests.patch \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ + gnu/packages/patches/python-cliff-remove-unicodecsv.patch \ gnu/packages/patches/python-configobj-setuptools.patch \ gnu/packages/patches/python-paste-remove-website-test.patch \ gnu/packages/patches/python-paste-remove-timing-test.patch \ diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm index 43f3e12..d1e1fa0 100644 --- a/gnu/packages/openstack.scm +++ b/gnu/packages/openstack.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages openstack) + #:use-module (gnu packages) #:use-module (gnu packages python) #:use-module (gnu packages tls) #:use-module (guix build-system python) @@ -773,3 +774,52 @@ permanence.") ("python2-oslosphinx" ,python2-oslosphinx) ,@(fold alist-delete (package-native-inputs swiftclient) '("python-keystoneclient" "python-oslosphinx"))))))) + +(define-public python-cliff + (package + (name "python-cliff") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/23/80/" + "bd8e87608c4536a729e0b791982711b61918818d8658ae3cb7c898f77c00/" + "cliff-" version ".tar.gz")) + (sha256 + (base32 + "10npasjxzchlvqmmgln1h42lbf4p74gp92y8qlykx8l0xp1rs8bf")) + (patches (search-patches + "python-cliff-remove-unicodecsv.patch")))) + (build-system python-build-system) + (propagated-inputs + `(("python-cmd2" ,python-cmd2) + ("python-prettytable" ,python-prettytable) + ("python-pyparsing" ,python-pyparsing) + ("python-pyyaml" ,python-pyyaml) + ("python-six" ,python-six) + ("python-stevedore" ,python-stevedore))) + (native-inputs + `(("python-coverage" ,python-coverage) + ("python-httplib2" ,python-httplib2) + ("python-mock" ,python-mock) + ("python-oslosphinx" ,python-oslosphinx) + ("python-pbr" ,python-pbr) + ("python-setuptools" ,python-setuptools) + ("python-sphinx" ,python-sphinx) + ("python-docutils" ,python-docutils) + ("python-nose" ,python-nose))) + (home-page "https://launchpad.net/python-cliff") + (synopsis + "Command Line Interface Formulation Framework") + (description + "A framework for building command line programs. It provides +subcommands, output formatters, and other extensions.") + (license asl2.0))) + +(define-public python2-cliff + (let ((base (package-with-python2 (strip-python2-variant python-cliff)))) + (package + (inherit base) + (propagated-inputs `(("python2-unicodecsv" ,python2-unicodecsv) + ,@(package-propagated-inputs base)))))) diff --git a/gnu/packages/patches/python-cliff-remove-unicodecsv.patch b/gnu/packages/patches/python-cliff-remove-unicodecsv.patch new file mode 100644 index 0000000..99b4aa2 --- /dev/null +++ b/gnu/packages/patches/python-cliff-remove-unicodecsv.patch @@ -0,0 +1,11 @@ +diff --git a/requirements.txt b/requirements.txt +index f334651..c16761e 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -7,5 +7,5 @@ PrettyTable<0.8,>=0.7 # BSD + pyparsing>=2.0.1 # MIT + six>=1.9.0 # MIT + stevedore>=1.5.0 # Apache-2.0 +-unicodecsv>=0.8.0 # BSD ++unicodecsv>=0.8.0;python_version<='2.7'# BSD + PyYAML>=3.1.0 # MIT -- 2.6.2