From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 6/6] gnu: add python-geoip2 and python2-geoip2 Date: Thu, 21 Apr 2016 21:19:54 +0200 Message-ID: <1461266395-2731-8-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]:50093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK99-00042i-75 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 1atK94-0006cD-0s for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:15 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:47833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK93-0006bp-Q8 for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:09 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qrT95300hz3hjHy for ; Thu, 21 Apr 2016 21:20:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qrT952vcTzvkFH for ; Thu, 21 Apr 2016 21:20:09 +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 97tMXD0YU2BG for ; Thu, 21 Apr 2016 21:20:08 +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:08 +0200 (CEST) Received: from thisbe.goebel-consult.de (unknown [192.168.110.30]) by hermia.goebel-consult.de (Postfix) with ESMTP id 5D8F3607A0 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 variables. --- gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 0d07451..5bf026d 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) @@ -8890,3 +8891,36 @@ MaxMind DB files.") `(("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 maxmind database + (inputs + `(("python-maxminddb" ,python-maxminddb) ; >=1.1.0 + ("python-requests" ,python-requests))) ; >=2.4 + (native-inputs + `(("python-requests-mock" ,python-requests-mock) + ("python-six" ,python-six) + ("python-setuptools" ,python-setuptools))) + (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