guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb


From: Hartmut Goebel
Subject: [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb
Date: Sun, 17 Apr 2016 22:50:55 +0200

* gnu/packages/python.scm: (python-maxminddb) (python2-maxminddb):
  New functions.
---
 gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f0e00dd..43e0657 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8847,3 +8847,41 @@ APIs and frameworks.")
 
 (define-public python2-selenium
   (package-with-python2 python-selenium))
+
+(define-public python-maxminddb
+  (package
+    (name "python-maxminddb")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "maxminddb" version))
+       (sha256
+        (base32
+         "1f7smwdn5x3rnjzyl46n7dmxpjis6qkb6akk5w2nnc8ik936rgq0"))))
+    (build-system python-build-system)
+    (arguments
+     ;; tests require a copy of the maxminddb which is not included
+     `(#:tests? #f))
+    (inputs
+     ;; todo: if libmaxmind is available, add it here to get the C-extension
+     `(("python-setuptools" ,python-setuptools)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "http://www.maxmind.com/";)
+    (synopsis "Reader for the MaxMind DB format")
+    (description "This is a Python module for reading MaxMind DB files.  The
+module includes both a pure Python reader and an optional C extension.
+
+MaxMind DB is a binary file format that stores data indexed by IP address
+subnets (IPv4 or IPv6).")
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-maxminddb))))))
+
+(define-public python2-maxminddb
+  (let ((base (package-with-python2 (strip-python2-variant python-maxminddb))))
+    (package (inherit base)
+      (inputs
+       `(("python2-ipaddr" ,python2-ipaddr)
+         ,@(package-inputs base))))))
+
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]