summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-07 07:49:20 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-07 08:17:43 +0200
commit9ebf766a029933bde6e58c7056d0d4b5f655790c (patch)
tree3a2e1bd14ea3952f94b348e2552ea4cff0706b85 /dev-python/psycopg
parentsys-kernel/git-sources: Automated version bump to 5.9_rc4. (diff)
downloadgentoo-9ebf766a029933bde6e58c7056d0d4b5f655790c.tar.gz
gentoo-9ebf766a029933bde6e58c7056d0d4b5f655790c.tar.bz2
gentoo-9ebf766a029933bde6e58c7056d0d4b5f655790c.zip
dev-python/psycopg: Bump to 2.8.6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/psycopg')
-rw-r--r--dev-python/psycopg/Manifest1
-rw-r--r--dev-python/psycopg/psycopg-2.8.6.ebuild65
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest
index 4c2172a1c623..de875fad3b68 100644
--- a/dev-python/psycopg/Manifest
+++ b/dev-python/psycopg/Manifest
@@ -1,2 +1,3 @@
DIST psycopg2-2.7.7.tar.gz 427474 BLAKE2B bc721b721693bc5f560a4829e84715d15e8c14523ada00109c7d7ba916c91928082fff286bd3c2ff5987c0436443128d1408ac9de073ad538b1e356fc73aaf8f SHA512 032344957c00bf659ca5e46f54f827a6d79809e370d661cd349e2ce935873359bcc4f440b74c6f14658bf1cd9598b6d884abae507fd33db9e07b01fc87967fb0
DIST psycopg2-2.8.5.tar.gz 380874 BLAKE2B 843321175499bf00b080d3e58ce0d586e674585af4be5a08866b5dbb68256ff9232d3c25e2603a3a0920a6c91927eb9fbb5942acd429be5dab9177c65da0c32e SHA512 d4cf9b94573b90fe56555ea5cf841aa0c4c806770f92f35a7ef2531999bb50f98eb1276e56f1540b5f2695e443bac7e9cb8bbfbd24ed82164f99663259d2da3e
+DIST psycopg2-2.8.6.tar.gz 383797 BLAKE2B da0e3f1e143c51c940ba1f51d3e457b492d880ab71267dacd4747444bc767711ccd6c2f54d9e10ce5ad8fae0c3206fb4b6199f267e9bbaf12eb654227f59c2b0 SHA512 1e1d5d8755c6d1a153d84210bf29902afafe853659d709e13abc6bc5772def13779d2394690af1c544384c9c607edc0fe5cf2763244fb346febf9a9e0032b45f
diff --git a/dev-python/psycopg/psycopg-2.8.6.ebuild b/dev-python/psycopg/psycopg-2.8.6.ebuild
new file mode 100644
index 000000000000..eab79881aa49
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.8.6.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN="${PN}2"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="PostgreSQL database adapter for Python"
+HOMEPAGE="https://www.psycopg.org https://pypi.org/project/psycopg2/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="LGPL-3+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+# automagic dep on mxdatetime (from egenix-mx-base)
+# the package was removed, so let's just make sure it's gone
+RDEPEND=">=dev-db/postgresql-8.1:*"
+DEPEND="${RDEPEND}
+ test? ( >=dev-db/postgresql-8.1[server] )
+ !!dev-python/egenix-mx-base"
+
+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
+
+ distutils-r1_python_prepare_all
+}
+
+src_test() {
+ initdb -D "${T}"/pgsql || die
+ # TODO: random port
+ pg_ctl -w -D "${T}"/pgsql start \
+ -o "-h '' -k '${T}'" || die
+ createdb -h "${T}" psycopg2_test || die
+
+ local -x PSYCOPG2_TESTDB_HOST="${T}"
+ distutils-r1_src_test
+
+ pg_ctl -w -D "${T}"/pgsql stop || die
+}
+
+python_test() {
+ "${EPYTHON}" -c "
+import tests
+tests.unittest.main(defaultTest='tests.test_suite')
+" --verbose || die "Tests fail with ${EPYTHON}"
+}