summaryrefslogtreecommitdiff
path: root/dev-python/psycopg
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/psycopg
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/psycopg')
-rw-r--r--dev-python/psycopg/Manifest4
-rw-r--r--dev-python/psycopg/psycopg-2.8.4.ebuild27
-rw-r--r--dev-python/psycopg/psycopg-2.8.5.ebuild65
3 files changed, 90 insertions, 6 deletions
diff --git a/dev-python/psycopg/Manifest b/dev-python/psycopg/Manifest
index 08979f036d58..b4778095eb35 100644
--- a/dev-python/psycopg/Manifest
+++ b/dev-python/psycopg/Manifest
@@ -2,6 +2,8 @@ AUX psycopg-2.7.3-avoid-mxdatetime.patch 1832 BLAKE2B dff21302f85dc05be27147d1a5
AUX psycopg-2.8.3-avoid-mxdatetime.patch 954 BLAKE2B 073eca8e49dd4d7fd2ec920dfe52e255d3fbb0e9975cd0378574d7c6f6f097c4b0bae0f4eba74e939b15c19ccab1dbe84d28f434830d38db6b59e18246c3f2c2 SHA512 9e0ac41a70002bdac03628ac15b84edd3e67e589f8ca145242018aab03fc42b8befc1c0330f0111d01b239dc00b6ffc29965ba3c18ce0965cbe9e7b31d1fef4d
DIST psycopg2-2.7.7.tar.gz 427474 BLAKE2B bc721b721693bc5f560a4829e84715d15e8c14523ada00109c7d7ba916c91928082fff286bd3c2ff5987c0436443128d1408ac9de073ad538b1e356fc73aaf8f SHA512 032344957c00bf659ca5e46f54f827a6d79809e370d661cd349e2ce935873359bcc4f440b74c6f14658bf1cd9598b6d884abae507fd33db9e07b01fc87967fb0
DIST psycopg2-2.8.4.tar.gz 377883 BLAKE2B 6d25a96d6fb45cc450b20fb570741538c2870e0ab205b9aab1018d4ef716bfba129235a422f2a0dfd182162bff948db8a2e4d23cd57dc01971f2e6f734ebf90e SHA512 d4590c6e4e310d280b6b341cb23427b56b04c1ef08e877f0d99a79c6b00b959307bb18defaf1d9cea58482fb974a78760c5f26a3ece8c1f34ae1840570a71a28
+DIST psycopg2-2.8.5.tar.gz 380874 BLAKE2B 843321175499bf00b080d3e58ce0d586e674585af4be5a08866b5dbb68256ff9232d3c25e2603a3a0920a6c91927eb9fbb5942acd429be5dab9177c65da0c32e SHA512 d4cf9b94573b90fe56555ea5cf841aa0c4c806770f92f35a7ef2531999bb50f98eb1276e56f1540b5f2695e443bac7e9cb8bbfbd24ed82164f99663259d2da3e
EBUILD psycopg-2.7.7.ebuild 1543 BLAKE2B 0c39cf7c409657c2954e72456892b53fd0b3714dca06c0527ae24a799955f2641d6bbb190df3457391044520f92955f57b086f6c879a7d57808f5616577a8b6f SHA512 b62576ef8bcbb5dbf863f16d3c4322d938b0ec0d3a43fef70b39177e7a11f9fe07e78229e41caa35976131e93c928c62dd196faf641cde5006e3db829260d5dd
-EBUILD psycopg-2.8.4.ebuild 1419 BLAKE2B 48a8af8d4c26ae9fbe3c2f3309d41996e194b92ad8f914d6fe25366eb7cbdadf60340100286e8e423e59bd51330948dcdf552734c003b4c74e7725aca8b26866 SHA512 1372cf52a655aaa7b7e7ac0366f7ed41baf4ebb77cab2c768425eb30149caeebcae0f66b71c05ae0c5c2fffd5ceed7c9aede29ca9907fb3842fbd4b572ded5cb
+EBUILD psycopg-2.8.4.ebuild 1825 BLAKE2B 16bb7de2454e41381ce67a522c2efb8e857fb45ec582c7c1f5693fbea4e5fc7c9fee011fe5ca540e14cc008fd9f0f32ecec3126eb2343861728e46d2081ff596 SHA512 939e698018e2444ee896e1454d0705b3295541ae983c11134e8702faf0b06935fce2286b19a05859c27f199576562dbe631f727f2ed0f4ac322742f1622419b6
+EBUILD psycopg-2.8.5.ebuild 1534 BLAKE2B e946a1df34822648f9db4ebe591d4323771d467c38c6914e49be46de198673eb87f14c183e8e6fc75c937e2f8e0a9c9ec650d2c6e626a01a45333a22af70f7ed SHA512 c6a1083e7e0c2b96675a4b66a1428e331330052f76f0ec85747188efc374cb7e3b57314d3d561506264fb183b6567c5d5d86aad8659f7502310c79f3d5d66227
MISC metadata.xml 321 BLAKE2B aff48bec04e34b92668aa18214d86ddbedef2376eeced4815118d35eebfb8e6af87234a9470828f465626f7d9ed56fe0fcb8f078c23945371248136533651ad3 SHA512 358b751b3a65f64ab5468bcf4022315f7069a2fb60709c2bb12ac02577866a3ff24ab2dd69577052070cf010a51428cb3ec385ca7cfe48640f4dd25ae478a966
diff --git a/dev-python/psycopg/psycopg-2.8.4.ebuild b/dev-python/psycopg/psycopg-2.8.4.ebuild
index f5b41a2bfa7d..0552c717acc9 100644
--- a/dev-python/psycopg/psycopg-2.8.4.ebuild
+++ b/dev-python/psycopg/psycopg-2.8.4.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
inherit distutils-r1 flag-o-matic
@@ -13,6 +13,7 @@ MY_P="${MY_PN}-${PV}"
DESCRIPTION="PostgreSQL database adapter for Python"
HOMEPAGE="http://initd.org/psycopg/ 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"
@@ -26,15 +27,11 @@ DEPEND="${RDEPEND}
>=dev-python/sphinx-1.6
)"
-RESTRICT="test"
-
# Avoid using mxdatetime: https://bugs.gentoo.org/452028
PATCHES=(
"${FILESDIR}"/psycopg-2.8.3-avoid-mxdatetime.patch
)
-S="${WORKDIR}/${MY_P}"
-
python_compile() {
local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
@@ -55,6 +52,26 @@ python_compile_all() {
use doc && emake -C doc/src -j1 html text
}
+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}"
+}
+
python_install_all() {
if use doc; then
dodoc -r doc/src/_build/html
diff --git a/dev-python/psycopg/psycopg-2.8.5.ebuild b/dev-python/psycopg/psycopg-2.8.5.ebuild
new file mode 100644
index 000000000000..418f438ce30f
--- /dev/null
+++ b/dev-python/psycopg/psycopg-2.8.5.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="http://initd.org/psycopg/ 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"
+
+RDEPEND=">=dev-db/postgresql-8.1:*"
+DEPEND="${RDEPEND}"
+
+# Avoid using mxdatetime: https://bugs.gentoo.org/452028
+PATCHES=(
+ "${FILESDIR}"/psycopg-2.8.3-avoid-mxdatetime.patch
+)
+
+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}"
+}