From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2 Date: Thu, 21 Apr 2016 21:19:55 +0200 Message-ID: <1461266395-2731-9-git-send-email-h.goebel@crazy-compilers.com> References: <1461266395-2731-1-git-send-email-h.goebel@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK99-00042j-6v for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atK95-0006dB-IW for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:15 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:36016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK95-0006cx-Cl for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:11 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qrT9708Kzz3hjHy for ; Thu, 21 Apr 2016 21:20:11 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qrT9704XtzvkFH for ; Thu, 21 Apr 2016 21:20:11 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id JpaXGExA2GUX for ; Thu, 21 Apr 2016 21:20:09 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-141-229.dynamic.mnet-online.de [188.174.141.229]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Thu, 21 Apr 2016 21:20:09 +0200 (CEST) Received: from thisbe.goebel-consult.de (unknown [192.168.110.30]) by hermia.goebel-consult.de (Postfix) with ESMTP id 6C35160809 for ; Thu, 21 Apr 2016 21:19:57 +0200 (CEST) In-Reply-To: <1461266395-2731-1-git-send-email-h.goebel@crazy-compilers.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/python.scm (python-geoip2) (pythons-geoip2): New functions. --- gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 197f236..330be07 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -63,6 +63,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages networking) #:use-module (gnu packages ncurses) + #:use-module (gnu packages openstack) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -8889,3 +8890,36 @@ subnets (IPv4 or IPv6).") `(("python2-ipaddr" ,python2-ipaddr) ,@(package-inputs base)))))) +(define-public python-geoip2 + (package + (name "python-geoip2") + (version "2.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "geoip2" version)) + (sha256 + (base32 + "0jxh5p0d2ff1snv9n2xmjib2qw6vz0s2jgcdh69xblfssskgqnr6")))) + (build-system python-build-system) + (arguments `(#:tests? #f)) ; tests require a copy of the database + (inputs + `(("python-maxminddb" ,python-maxminddb) ; >=1.1.0 + ("python-requests" ,python-requests) ; >=2.4 + ("python-setuptools" ,python-setuptools))) + (native-inputs + `(("python-requests-mock" ,python-requests-mock) + ("python-six" ,python-six))) + (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 asl2.0) + (properties `((python2-variant . ,(delay python2-mayminddb)))))) + +(define-public python2-geoip2 + (let ((base (package-with-python2 (strip-python2-variant python-geoip2)))) + (package (inherit base) + (inputs + `(("python2-ipaddr" ,python2-ipaddr) + ,@(package-inputs base)))))) -- 2.7.4