From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v2] gnu: Add python-psycopg2, python2-psycopg2 Date: Wed, 24 Feb 2016 23:39:18 +0100 Message-ID: <20160224233918.3d70dd72@scratchpost.org> References: <20160219120106.62631a44@scratchpost.org> <20160219212258.GA4418@jasmine> <20160222013949.186f25bc@scratchpost.org> <87egc54gg4.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYi5h-0001kt-F4 for guix-devel@gnu.org; Wed, 24 Feb 2016 17:39:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYi5e-0002Nc-8t for guix-devel@gnu.org; Wed, 24 Feb 2016 17:39:29 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:36150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYi5e-0002NW-28 for guix-devel@gnu.org; Wed, 24 Feb 2016 17:39:26 -0500 In-Reply-To: <87egc54gg4.fsf@dustycloud.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Christopher Allan Webber Cc: guix-devel diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 55a62a9..e1dbc31 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -17,6 +17,7 @@ ;;; Copyright =C2=A9 2015, 2016 Efraim Flashner ;;; Copyright =C2=A9 2015 Kyle Meyer ;;; Copyright =C2=A9 2015 Chris Marusich +;;; Copyright =C2=A9 2016 Danny Milosavljevic ;;; ;;; This file is part of GNU Guix. ;;; @@ -8156,3 +8157,34 @@ introspection of @code{zope.interface} instances in = code.") =20 (define-public python2-sphinx-repoze-autointerface (package-with-python2 python-sphinx-repoze-autointerface)) + +(define-public python-psycopg2 + (package + (name "python-psycopg2") + (version "2.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "psycopg2" version)) + (sha256 + (base32 + "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ; TODO re-enable after providing a test-db. + ; Tests would require a postgresql database "psycopg2_test" + ; and a running postgresql database management service. + (inputs + `(("postgresql" ,postgresql))) ; libpq + (home-page "http://initd.org/psycopg/") + (synopsis "Python PostgreSQL adapter") + (description + "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API = 2.0.") + (license lgpl3+) + (properties `((python2-variant . ,(delay python2-psycopg2)))))) + +(define-public python2-psycopg2 + (package + (inherit (package-with-python2 + (strip-python2-variant python-psycopg2))) + (native-inputs `(("python2-setuptools" ,python2-setuptools)))))