summaryrefslogtreecommitdiff
path: root/dev-python/psycopg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/psycopg
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/psycopg')
-rw-r--r--dev-python/psycopg/Manifest14
-rw-r--r--dev-python/psycopg/files/psycopg-2.4.2-setup.py.patch13
-rw-r--r--dev-python/psycopg/metadata.xml11
-rw-r--r--dev-python/psycopg/psycopg-1.1.21-r1.ebuild72
-rw-r--r--dev-python/psycopg/psycopg-2.5.3.ebuild67
-rw-r--r--dev-python/psycopg/psycopg-2.6.2.ebuild74
-rw-r--r--dev-python/psycopg/psycopg-2.7.3.1.ebuild74
-rw-r--r--dev-python/psycopg/psycopg-2.7.3.ebuild74
8 files changed, 399 insertions, 0 deletions
diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest
new file mode 100644
index 000000000000..501841417a34
--- /dev/null
+++ b/dev-python/psycopg/Manifest
@@ -0,0 +1,14 @@
+AUX psycopg-2.4.2-setup.py.patch 568 SHA256 9dbdab62bf2018efe48afe72170daff494d6fbcace00da911b44066e2b31b847 SHA512 9111df177d89559b0e397bc0ca9844636f981552d4bac3ae04abfdae5c68bc4f9efc553829da9c3a653536ddb18f01a3049e9ece746d0fe3328684a6ef6b6976 WHIRLPOOL f7a5054b1daffc82e37893592a1444708ebf1e91519b5a47d9d7ae2c962e0883d95141b5dcf558fac8042357759513cfc249f038681b6db6d3f5e9caed2c55cf
+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.6.2.tar.gz 376348 SHA256 70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c SHA512 614314b5ab7ab5fa7c5e9c4f861579f90bd73521a9964dcb5a0938f77a9d6dfbea689cef35ad399cda698a45bb736c315912cb5dca85a52132f011d79f4863ac WHIRLPOOL 51f9577abcd495eb688f227751c1f4622ac3c3922b44c455acef54f974809f71829ca5ce901fff9866366c33d6ea91d2616e15ac7d5b9ea1c0b4a30cdb907f7b
+DIST psycopg2-2.7.3.1.tar.gz 425069 SHA256 9b7b16e26448b43cf167f785d8b5345007731ebf153a510e12dae826800caa65 SHA512 206d4cf62a091927daf4b734e0b3597399fc588cb738366711674fc06c39d68a682981bc4756c356d37c41caba49b5df2b915beace8670c190d7d41e374f1eb5 WHIRLPOOL 3bb9f53e42c5d82bb75833921183c4af08ff04755a9ca2efd4c16eb064c48b51724c6d3cd27342d602aa7facc0ba01af0fdcb532c96afc4b0305497f7dc29863
+DIST psycopg2-2.7.3.tar.gz 425004 SHA256 c9bd49848556d04093909faec017c3675efabf78c2b7f383bf7c43ba18324ac8 SHA512 9e673f47190b12ab31e783a3d2b464231b933cc6ad4f12742c457020aab5db36b83829d84b4e63f793f5567e689081fd9479bfc4634b7bb08c7d873a3f42efc9 WHIRLPOOL 51ba355f684e313e811014bc420911857e062b7f07ac92bf626cb4dd4b7a576f46c689c93a7a27f35dd49fb369d32f6b371e15eb48efc35374a8e084bc1e9fd1
+EBUILD psycopg-1.1.21-r1.ebuild 1569 SHA256 10b65c5c92e71aae6423442ecdf204935939d69ee0495dc9dee5df36ac3e98ee SHA512 e69ba12412bc2d3d76fd3eeb4326bd33aec7ca8bf3f6830b6efdfd66640c7dfe036d7e09a8a0340a5b5fb448c57dd01cbb7b1a5a1810ca502ecd6796d285162e WHIRLPOOL ee5f571272a9b6cf37cb14c3ea35de8713f60897aa5dc014618ad59b0a7a3a189b41819803f5419af05a165f939fcc38208358c53df3ef5a4f85e050e8bbcc4e
+EBUILD psycopg-2.5.3.ebuild 1456 SHA256 31bb87615eb6d32e9423d5e7431d8409d7d58233c0c39d2068f751fda11bf176 SHA512 c349bd2b9908bfd33e86d197569e080b52b08fd8255f719fcd625a0a5bffc391e18c66e988f8ba7be5383bf37adc1542c91e018bac76026f29a22c2dbfe81f3c WHIRLPOOL 9b594920e7d7ea9d5d3d312f1ec6fb18606a65751a3a51eed1232147268a7a7e5a5e0618025df61f34472014fc572f337ffb2903fc7a78f00e084733cce8a76e
+EBUILD psycopg-2.6.2.ebuild 1966 SHA256 1b0bcf8ccbc584ccd9d414d777f94c28bab202a957abaa6f10a2a8ff82f8fe69 SHA512 0b87755b75f0ddd72a474795942247327fd8e05ba63f8723b505ac43f96980ebc273b9ace49f8a408c87c7a86d989b6f7627585f3764fed3bb9d11cb86718115 WHIRLPOOL 4953a43f29dcd63073c6d5ee5c9a2e976a9309cac3b29c183ad0ac7a05ff79fa9eaa8bf31ca912afa0ef9213ef35c790b4899b0cadfcc667ba66bbdf350627ae
+EBUILD psycopg-2.7.3.1.ebuild 1928 SHA256 8a01d5e250df6cb985250e3b6056e7f14b70dc08c483be278ce99a5befdda463 SHA512 3608d22ec32acfc50db5dd8c9cbf63138123153071bae3203db718d3ac822ff8da28da648de0268949dcabc71808e0e148bfdd64c153aa46a1c6b6650cece0ec WHIRLPOOL 2f0401f381941ddcdbc565e7fed778232642b810be04acf526dda976845cb0fd778ad912312f90cc7d08ec509c8b40f93159e10d0f9f814aaec66988b74d0bda
+EBUILD psycopg-2.7.3.ebuild 1919 SHA256 a3ffa31f698b703904e7e21cfce4861373179a51b95f3f459d5f7fdae6bc7ac7 SHA512 84cfe36d770054cf31158dff615ce1cd7caf16b8db8af4a411a885f1c80e4ec9e668143c0828f68ccb0ad1fe5c72b2e188cbcccfff51db0ad305c797855c6271 WHIRLPOOL d2fde070ac5b91d367184d4ac1ad425214278429f8774538d19592c15c9b37fb0e4b8f0ac1cce80a8b66ffcca6dd337289fb17ee980e2e2eec6a56a0dbb911c7
+MISC ChangeLog 4208 SHA256 a49648ae3e6756df43d2b82182d609a348965250e5738f7dedfe4503caa85708 SHA512 2108043606f96e440b6d23118e819da94560a579034fc25ef2e458ff2c8896529bd245e037ef8d449df2ab59ffe78004bf1d14307d58aa83dc8c0f49436ce422 WHIRLPOOL f227e09881c43399c6f45e03f12329ac3d312b0f3b066fb006359f8c4cad646e1e60807b473ecc45f0d855cd9098302cd7c3c48ec18d395509258093687636c2
+MISC ChangeLog-2015 26947 SHA256 60134214d329fe88a4d6977bcefdea8b95fe04491fdbf4d47a0c55ccf172a116 SHA512 13113dced8681777c520628776a582dd1d8f0700528b5f4db3e8fca146c0ccb999de2411dcc9bbaa9d063fad60bf26d957c7690d84c8a183ba544124f9a6ac4c WHIRLPOOL 5ff340d555034f54c34d123e6260498e2faf6b602050217795e681f9e29dd545995e58dd8469b6745a083cded323ff2a16abdb4d0a3180996f4a231c54f2558a
+MISC metadata.xml 321 SHA256 e75b08481b27195ef0df1c5d630593762ab621c56884683833279dbb30f349dd SHA512 358b751b3a65f64ab5468bcf4022315f7069a2fb60709c2bb12ac02577866a3ff24ab2dd69577052070cf010a51428cb3ec385ca7cfe48640f4dd25ae478a966 WHIRLPOOL fbf1252483bbb27eece55d28c50f8111892c75237706cd890f4d2d9445d38b4958b81a214952d0950676977d8ac4167a33517a20d82d8f63a5104e8fd4610785
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..9263d11136c4
--- /dev/null
+++ b/dev-python/psycopg/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <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..84902f8172ed
--- /dev/null
+++ b/dev-python/psycopg/psycopg-1.1.21-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+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
+ dodoc -r doc/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ 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..4fa5833cee8c
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.5.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+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/ https://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.6.2.ebuild b/dev-python/psycopg/psycopg-2.6.2.ebuild
new file mode 100644
index 000000000000..3ebb4749cd18
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.6.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+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/ https://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 ~arm64 ~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.7.3.1.ebuild b/dev-python/psycopg/psycopg-2.7.3.1.ebuild
new file mode 100644
index 000000000000..8571410b80b6
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.7.3.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+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/ https://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 ~arm64 ~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=( )
+
+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.7.3.ebuild b/dev-python/psycopg/psycopg-2.7.3.ebuild
new file mode 100644
index 000000000000..f70647ab04ca
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.7.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+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/ https://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 ~arm64 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=( )
+
+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
+}