summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2016-11-05 12:27:02 +0100
committerMarius Bakke <mbakke@fastmail.com>2016-11-06 19:53:13 +0000
commitb91912c42a39bbc77f487ef30edf9ed409be5d21 (patch)
treef66eb495c5d4a2a71e105d4afa0a8e18fb28e783
parent4a0933307e21051ad16d869e6ab3833291052b60 (diff)
downloadguix-b91912c42a39bbc77f487ef30edf9ed409be5d21.tar.gz
gnu: Add python-orderedmultidict.
* gnu/packages/python.scm (python-orderedmultidict, python2-orderedmultidict):
  New variables.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
-rw-r--r--gnu/packages/python.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 20a0a74115..cd74aa4429 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3882,6 +3882,48 @@ Python code against some of the style conventions in
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
 
+(define-public python-orderedmultidict
+  (package
+    (name "python-orderedmultidict")
+    (version "0.7.10")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "orderedmultidict" version))
+        (sha256
+          (base32
+            "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             ;; The package uses nosetest for running the tests.
+             ;; Adding this initfile allows to run the test suite
+             ;; without requiring nosetest.
+             (zero? (system* "touch" "tests/__init__.py")))))))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (native-inputs
+     `(("python-pycodestyle" ,python-pycodestyle)))
+    (home-page "https://github.com/gruns/orderedmultidict")
+    (synopsis "Python Ordered Multivalue Dictionary - omdict")
+    (description "This package contains a library for ordered multivalue
+dictionaries.  A multivalue dictionary is a dictionary that can store
+multiple values for the same key.  An ordered multivalue dictionary is a
+multivalue dictionary that retains the order of insertions and deletions.")
+    (license license:unlicense)
+    (properties `((python2-variant . ,(delay python2-orderedmultidict))))))
+
+(define-public python2-orderedmultidict
+  (let ((base (package-with-python2 (strip-python2-variant
+                                     python-orderedmultidict))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-sqlalchemy-utils
   (package
     (name "python-sqlalchemy-utils")