diff options
author | Danny Milosavljevic <dannym@scratchpost.org> | 2016-02-25 13:26:45 -0800 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2016-02-25 14:35:28 -0800 |
commit | b31fbea566d432ae8be616ac774d51a23436c362 (patch) | |
tree | a8f06f2ea7910da4cda275a626fde829ea7601af /gnu/packages/python.scm | |
parent | 7dd21101a3be8c10674c1dc0ce40a842d7b0619c (diff) | |
download | patches-b31fbea566d432ae8be616ac774d51a23436c362.tar patches-b31fbea566d432ae8be616ac774d51a23436c362.tar.gz |
gnu: Add python-psycopg2.
* gnu/packages/python.scm (python-psycopg2, python2-psycopg2): New variables.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r-- | gnu/packages/python.scm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 02883f8280..b67aed05f7 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com> +;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -8235,3 +8236,34 @@ introspection of @code{zope.interface} instances in code.") (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 would require a postgresql database "psycopg2_test" + ;; and a running postgresql database management service. + `(#:tests? #f)) ; TODO re-enable after providing a test-db. + (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))))) |