summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/psycopg
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/psycopg')
-rw-r--r--dev-python/psycopg/Manifest5
-rw-r--r--dev-python/psycopg/files/psycopg-2.0.9-round-solaris.patch13
-rw-r--r--dev-python/psycopg/files/psycopg-2.4.2-begin-segfault.patch34
-rw-r--r--dev-python/psycopg/files/psycopg-2.4.2-setup.py.patch13
-rw-r--r--dev-python/psycopg/metadata.xml8
-rw-r--r--dev-python/psycopg/psycopg-1.1.21-r1.ebuild73
-rw-r--r--dev-python/psycopg/psycopg-2.5.3.ebuild68
-rw-r--r--dev-python/psycopg/psycopg-2.5.4.ebuild73
-rw-r--r--dev-python/psycopg/psycopg-2.6.1.ebuild72
-rw-r--r--dev-python/psycopg/psycopg-2.6.ebuild72
10 files changed, 431 insertions, 0 deletions
diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest
new file mode 100644
index 000000000000..c4df0ec4f2e3
--- /dev/null
+++ b/dev-python/psycopg/Manifest
@@ -0,0 +1,5 @@
+DIST psycopg-1.1.21.tar.gz 213753 SHA256 f487d02e8e8837ec7e62e4e0f50bcb974e73b7765333b032ac50c07bf12ce240 SHA512 2681e8b3c4873f69a1a07aa4d3908a42f8e8be9392adbed189fe72c1a601699ac08643d24454622baf4b26153ef3a687f27a941308368e2227cb98ff948322eb WHIRLPOOL 022a4e1a01ac30338f2be14e549a9f35028c7bef7bb8f8a6e4602425ddff07d89e049d362a9b49f760e89afb52f153f3f0a197b828b79f75245f26fcf48a9c4b
+DIST psycopg2-2.5.3.tar.gz 690689 SHA256 3a2df3bb113187227aa97d0dd3d06e0f26be3d50dcdeeaef67fac59ed51a030a SHA512 88590c37be839e8cf5025b7ac40411c4682269700795c5f8f1b762966d906faf3f1ee85de35fc734a2d10c6a68d7fef569891bd96919bab809b9500625e2a41a WHIRLPOOL dccd694dfb2192992731e982b085ba4feb3b2b89d56c9e69ec88e0efbd14ec7367841849958aa1e9f190179b300ce511532d6b23e51b4f96babc302f37efcf4f
+DIST psycopg2-2.5.4.tar.gz 682578 SHA256 24ba3f328aba08d8d505bc2a8f68a94ebe24a85e8483640b667221bc0efd3b1e SHA512 24e7f7940cb55ad686d93c5baa3286be56a5c21376868403248fff919e54cfa57c039623c1b8c10947fa206aabb9eb865e051520a5a0445be133962eed016854 WHIRLPOOL bce35d47eb2025cf01ea9b7597318d56fcdf84b0cd29e251068f3f20c1f2c5b6ee5050fef6360c690c27d84f334b73a29553389f5e8a28b416151eb32c4b37f9
+DIST psycopg2-2.6.1.tar.gz 371373 SHA256 6acf9abbbe757ef75dc2ecd9d91ba749547941abaffbe69ff2086a9e37d4904c SHA512 00705f6b417acc89e2e66b7bdc25c31d92de7610173fe41b2b35728ebb6b55ef8c7df67032c2a2e3d908d8599a1d378578ade77bd19f5f186fbf2596290eda69 WHIRLPOOL 87ea72ed7ee762e7071a58a37a8b433d1ead28ab494100e790e01a602af41b4e5f04b3f27fd21bd3db3c74e5c35dc0d28ed42fa1e60925861a05bdfbada444d1
+DIST psycopg2-2.6.tar.gz 367972 SHA256 c00afecb302a99a4f83dec9b055c4d1cc196926d62c8db015d68432df8118ca8 SHA512 50618bef6372d9cf165bc9ee2f1c3d77727f359fdded825cdf9b6dfd513a9455fd5d935dfda203b2affa43c45cf86bb25b742db6f6b8228cc2fb293aa42bc4f1 WHIRLPOOL fee5180674ec60a6ade287a6f30efddaa8e4a830e8719a892c1aff22aa66ce4c5dd8fa5acf75f6cc17d8f65c104c79da129b664619f137f21618230d08308933
diff --git a/dev-python/psycopg/files/psycopg-2.0.9-round-solaris.patch b/dev-python/psycopg/files/psycopg-2.0.9-round-solaris.patch
new file mode 100644
index 000000000000..49d230c3b842
--- /dev/null
+++ b/dev-python/psycopg/files/psycopg-2.0.9-round-solaris.patch
@@ -0,0 +1,13 @@
+round() is available on Solaris
+
+--- psycopg/config.h
++++ psycopg/config.h
+@@ -102,7 +102,7 @@
+ #define inline
+ #endif
+
+-#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun)
++#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__))
+ /* what's this, we have no round function either? */
+ static double round(double num)
+ {
diff --git a/dev-python/psycopg/files/psycopg-2.4.2-begin-segfault.patch b/dev-python/psycopg/files/psycopg-2.4.2-begin-segfault.patch
new file mode 100644
index 000000000000..cbf2278d0bfa
--- /dev/null
+++ b/dev-python/psycopg/files/psycopg-2.4.2-begin-segfault.patch
@@ -0,0 +1,34 @@
+X-Git-Url: https://dndg.it/cgi-bin/gitweb.cgi?p=public%2Fpsycopg2.git;a=blobdiff_plain;f=psycopg%2Fpqpath.c;h=1f0d5da95bd88aa4d5468874047e4b0139ffadd3;hp=cee5ce4c9c053981710959ca28b7e68702c44a97;hb=de6f2ac387231fcd57c05031c82471ea57255e2b;hpb=d9fce1f837151e6eadfd8ca761ef328a721198bd
+
+diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c
+index cee5ce4..1f0d5da 100644
+--- a/psycopg/pqpath.c
++++ b/psycopg/pqpath.c
+@@ -344,11 +344,13 @@ pq_execute_command_locked(connectionObject *conn, const char *query,
+ }
+ if (*pgres == NULL) {
+ Dprintf("pq_execute_command_locked: PQexec returned NULL");
++ PyEval_RestoreThread(*tstate);
+ if (!PyErr_Occurred()) {
+ const char *msg;
+ msg = PQerrorMessage(conn->pgconn);
+ if (msg && *msg) { *error = strdup(msg); }
+ }
++ *tstate = PyEval_SaveThread();
+ goto cleanup;
+ }
+
+@@ -635,11 +637,13 @@ pq_get_guc_locked(
+
+ if (*pgres == NULL) {
+ Dprintf("pq_get_guc_locked: PQexec returned NULL");
++ PyEval_RestoreThread(*tstate);
+ if (!PyErr_Occurred()) {
+ const char *msg;
+ msg = PQerrorMessage(conn->pgconn);
+ if (msg && *msg) { *error = strdup(msg); }
+ }
++ *tstate = PyEval_SaveThread();
+ goto cleanup;
+ }
+ if (PQresultStatus(*pgres) != PGRES_TUPLES_OK) { \ No newline at end of file
diff --git a/dev-python/psycopg/files/psycopg-2.4.2-setup.py.patch b/dev-python/psycopg/files/psycopg-2.4.2-setup.py.patch
new file mode 100644
index 000000000000..a35502270e1f
--- /dev/null
+++ b/dev-python/psycopg/files/psycopg-2.4.2-setup.py.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index e03876a..f5ec2ac 100644
+--- a/setup.py
++++ b/setup.py
+@@ -461,7 +461,7 @@ if parser.has_option('build_ext', 'mx_include_dir'):
+ mxincludedir = parser.get('build_ext', 'mx_include_dir')
+ else:
+ mxincludedir = os.path.join(get_python_inc(plat_specific=1), "mx")
+-if os.path.exists(mxincludedir):
++if not use_pydatetime and os.path.exists(mxincludedir):
+ # Build the support for mx: we will check at runtime if it can be imported
+ include_dirs.append(mxincludedir)
+ define_macros.append(('HAVE_MXDATETIME', '1')) \ No newline at end of file
diff --git a/dev-python/psycopg/metadata.xml b/dev-python/psycopg/metadata.xml
new file mode 100644
index 000000000000..ff3e2390552d
--- /dev/null
+++ b/dev-python/psycopg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <upstream>
+ <remote-id type="pypi">psycopg2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/psycopg/psycopg-1.1.21-r1.ebuild b/dev-python/psycopg/psycopg-1.1.21-r1.ebuild
new file mode 100644
index 000000000000..423a63ae0f2b
--- /dev/null
+++ b/dev-python/psycopg/psycopg-1.1.21-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools-utils python-r1
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="http://www.initd.org/software/psycopg"
+SRC_URI="http://initd.org/pub/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="examples"
+
+RDEPEND=">=dev-python/egenix-mx-base-2.0.3[${PYTHON_USEDEP}]
+ dev-db/postgresql
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # fix for bug #134873
+ sed -e '1245s/static //' -i cursor.c || die
+ sed -e 's:$(PY_MOD_DIR):$(D)&/$$mod:' \
+ -e '/^CFLAGS/s:-I:-I. &:' \
+ -i Makefile.pre.in || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ python_configure() {
+ local myeconfargs=(
+ --with-mxdatetime-includes="$(python_get_includedir)/mx"
+ --with-postgres-includes="/usr/include/postgresql/server"
+ )
+
+ autotools-utils_src_configure
+
+ sed -e 's:$(BLDSHARED):& $(LDFLAGS):' \
+ -i "${BUILD_DIR}"/Makefile || die
+ }
+ python_foreach_impl python_configure
+}
+
+src_compile() {
+ python_foreach_impl autotools-utils_src_compile \
+ OPT="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_test() {
+ :
+}
+
+src_install () {
+ python_install() {
+ dodir "$(python_get_sitedir)"
+ autotools-utils_src_install
+ }
+
+ python_foreach_impl python_install
+
+ dodoc RELEASE-1.0 SUCCESS doc/python-taylor.txt
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r doc/examples/.
+ docompress -x "${INSDESTTREE}"
+ fi
+}
diff --git a/dev-python/psycopg/psycopg-2.5.3.ebuild b/dev-python/psycopg/psycopg-2.5.3.ebuild
new file mode 100644
index 000000000000..b37aec71b60e
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.5.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="http://initd.org/psycopg/ http://pypi.python.org/pypi/psycopg2"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+RDEPEND=">=dev-db/postgresql-8.1"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+
+ [[ ${EPYTHON} != python3* ]] && append-flags -fno-strict-aliasing
+
+ distutils-r1_python_compile
+}
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}-2.4.2-setup.py.patch"
+ )
+
+ if use debug; then
+ sed -i 's/^\(define=\)/\1PSYCOPG_DEBUG,/' setup.cfg || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc -j1 html text
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ dodoc doc/{HACKING,SUCCESS}
+
+ if use doc; then
+ dodoc doc/psycopg2.txt
+ dohtml -r doc/html/.
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r examples/.
+ fi
+}
diff --git a/dev-python/psycopg/psycopg-2.5.4.ebuild b/dev-python/psycopg/psycopg-2.5.4.ebuild
new file mode 100644
index 000000000000..a640e0da5fed
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.5.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="http://initd.org/psycopg/ http://pypi.python.org/pypi/psycopg2"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+RDEPEND=">=dev-db/postgresql-8.1"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+ >=dev-python/python-docs-2.7.6-r1:2.7 )"
+
+RESTRICT="test"
+# Remove py3.2 entry from intersphinx setting
+PATCHES=( "${FILESDIR}/"${PN}-2.4.2-setup.py.patch )
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+
+ ! python_is_python3 && append-flags -fno-strict-aliasing
+
+ distutils-r1_python_compile
+}
+
+python_prepare_all() {
+ if use debug; then
+ sed -i 's/^\(define=\)/\1PSYCOPG_DEBUG,/' setup.cfg || die
+ fi
+
+ # Source local copy of objects.inv
+ if use doc; then
+ local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
+ local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
+ local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
+ local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
+ sed -e "s|'http://docs.python.org/', None|'${PYTHON_DOC}', '${PYTHON_DOC_INVENTORY}'|" \
+ -e "/^ 'py3':/d" -i doc/src/conf.py || die
+ einfo "conf.py patched"
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc -j1 html text
+}
+
+python_install_all() {
+ if use doc; then
+ dodoc doc/psycopg2.txt
+ dohtml -r doc/html/.
+ fi
+
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/psycopg/psycopg-2.6.1.ebuild b/dev-python/psycopg/psycopg-2.6.1.ebuild
new file mode 100644
index 000000000000..c3dd0d3202d6
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.6.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="http://initd.org/psycopg/ http://pypi.python.org/pypi/psycopg2"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+RDEPEND=">=dev-db/postgresql-8.1"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+ >=dev-python/python-docs-2.7.6-r1:2.7 )"
+
+RESTRICT="test"
+# Remove py3.2 entry from intersphinx setting
+PATCHES=( "${FILESDIR}/"${PN}-2.4.2-setup.py.patch )
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+
+ ! python_is_python3 && append-flags -fno-strict-aliasing
+
+ distutils-r1_python_compile
+}
+
+python_prepare_all() {
+ if use debug; then
+ sed -i 's/^\(define=\)/\1PSYCOPG_DEBUG,/' setup.cfg || die
+ fi
+
+ # Source local copy of objects.inv
+ if use doc; then
+ local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
+ local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
+ local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
+ local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
+ sed -e "s|'http://docs.python.org/', None|'${PYTHON_DOC}', '${PYTHON_DOC_INVENTORY}'|" \
+ -e "/^ 'py3':/d" -i doc/src/conf.py || die
+ einfo "conf.py patched"
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc/src -j1 html text
+}
+
+python_install_all() {
+ if use doc; then
+ dohtml -r doc/src/_build/html/.
+ fi
+
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/psycopg/psycopg-2.6.ebuild b/dev-python/psycopg/psycopg-2.6.ebuild
new file mode 100644
index 000000000000..c3dd0d3202d6
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="http://initd.org/psycopg/ http://pypi.python.org/pypi/psycopg2"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+RDEPEND=">=dev-db/postgresql-8.1"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+ >=dev-python/python-docs-2.7.6-r1:2.7 )"
+
+RESTRICT="test"
+# Remove py3.2 entry from intersphinx setting
+PATCHES=( "${FILESDIR}/"${PN}-2.4.2-setup.py.patch )
+
+S="${WORKDIR}/${MY_P}"
+
+python_compile() {
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+
+ ! python_is_python3 && append-flags -fno-strict-aliasing
+
+ distutils-r1_python_compile
+}
+
+python_prepare_all() {
+ if use debug; then
+ sed -i 's/^\(define=\)/\1PSYCOPG_DEBUG,/' setup.cfg || die
+ fi
+
+ # Source local copy of objects.inv
+ if use doc; then
+ local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
+ local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
+ local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
+ local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
+ sed -e "s|'http://docs.python.org/', None|'${PYTHON_DOC}', '${PYTHON_DOC_INVENTORY}'|" \
+ -e "/^ 'py3':/d" -i doc/src/conf.py || die
+ einfo "conf.py patched"
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc/src -j1 html text
+}
+
+python_install_all() {
+ if use doc; then
+ dohtml -r doc/src/_build/html/.
+ fi
+
+ use examples && local EXAMPLES=( examples/. )
+
+ distutils-r1_python_install_all
+}