From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 5/6] gnu: add python-maxminddb and python2-maxminddb Date: Thu, 21 Apr 2016 21:19:52 +0200 Message-ID: <1461266395-2731-6-git-send-email-h.goebel@crazy-compilers.com> References: <1461266395-2731-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK91-0003mQ-M1 for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atK90-0006X6-Ls for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:07 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:43632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atK90-0006Wl-Fn for guix-devel@gnu.org; Thu, 21 Apr 2016 15:20:06 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qrT920mKGz3hjHy for ; Thu, 21 Apr 2016 21:20:06 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qrT920hX5zvkFH for ; Thu, 21 Apr 2016 21:20:06 +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 hHAztU0rbl0X for ; Thu, 21 Apr 2016 21:20:04 +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:04 +0200 (CEST) Received: from thisbe.goebel-consult.de (unknown [192.168.110.30]) by hermia.goebel-consult.de (Postfix) with ESMTP id 34BF86078C 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-maxminddb) (python2-maxminddb): New variable. --- gnu/packages/python.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index cc7e52f..0d07451 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8851,3 +8851,42 @@ for e.g. automating web-based administration tasks.") (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 "MaxMind DB is a binary file format that stores data indexed +by IP address subnets (IPv4 or IPv6). This is a Python module for reading +MaxMind DB files.") + ;; todo: currently only the pure-Python reader is build, see above + ;; The module includes both a pure Python reader and an + ;; optional C extension.") + (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