From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb Date: Sun, 17 Apr 2016 22:50:55 +0200 Message-ID: <1460926257-25147-6-git-send-email-h.goebel@crazy-compilers.com> References: <1460926257-25147-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1artfz-0001Py-4t for guix-devel@gnu.org; Sun, 17 Apr 2016 16:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1artev-0002Mn-26 for guix-devel@gnu.org; Sun, 17 Apr 2016 16:52:15 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:38511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arteu-0002M6-Ow for guix-devel@gnu.org; Sun, 17 Apr 2016 16:51:08 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qp3Mw1pK7z3hk7K for ; Sun, 17 Apr 2016 22:51:08 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qp3Mw1kJDzvdWJ for ; Sun, 17 Apr 2016 22:51:08 +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 jhBM0B8Zhydh for ; Sun, 17 Apr 2016 22:51:07 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-144-124.dynamic.mnet-online.de [188.174.144.124]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sun, 17 Apr 2016 22:51:07 +0200 (CEST) Received: from thisbe.goebel-consult.de (unknown [192.168.110.30]) by hermia.goebel-consult.de (Postfix) with ESMTP id 32FF96091F for ; Sun, 17 Apr 2016 22:50:59 +0200 (CEST) In-Reply-To: <1460926257-25147-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 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