* 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 <http://www.gnu.org/licenses/>. (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