summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2019-11-17 17:23:34 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2019-12-06 19:38:56 +0100
commit0a71e34e49c811c1d84565001226c84e70f325ef (patch)
tree7373827f4cb68de14234e8bf994ef94cb23eb33f /gnu/packages
parentb1414a81367605741a1d18f2a0bcebc784381cf7 (diff)
downloadguix-0a71e34e49c811c1d84565001226c84e70f325ef.tar.gz
gnu: Add python-geoip2.
* gnu/packages/geo.scm (python-geoip2): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/geo.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 26d270e4eb..f87225db95 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -65,6 +65,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sqlite)
@@ -1267,3 +1268,26 @@ associated with an address.")
 by IP address subnets (IPv4 or IPv6).  This is a Python module for reading
 MaxMind DB files.")
     (license license:asl2.0)))
+
+(define-public python-geoip2
+  (package
+    (name "python-geoip2")
+    (version "2.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "geoip2" version))
+       (sha256
+        (base32
+         "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ;; Tests require a copy of the maxmind database
+    (inputs
+     `(("python-maxminddb" ,python-maxminddb)
+       ("python-requests" ,python-requests)))
+    (home-page "http://www.maxmind.com/")
+    (synopsis "MaxMind GeoIP2 API")
+    (description "Provides an API for the GeoIP2 web services and databases.
+The API also works with MaxMind’s free GeoLite2 databases.")
+    (license license:asl2.0)))