summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-04-21 00:05:46 +0100
committerMarek Szuba <marecki@gentoo.org>2020-04-21 00:09:32 +0100
commit02dcd51d9738030093f3c8cc6d25eb55da7ba885 (patch)
tree1b6e8632f788c246586f9bb15d7b36c29d5fcc9f /dev-python/bsddb3
parentsys-block/fio: add py37/38 tags (diff)
downloadgentoo-02dcd51d9738030093f3c8cc6d25eb55da7ba885.tar.gz
gentoo-02dcd51d9738030093f3c8cc6d25eb55da7ba885.tar.bz2
gentoo-02dcd51d9738030093f3c8cc6d25eb55da7ba885.zip
dev-python/bsddb3: bump to 6.2.7
Now with python3_8 support. According to upstream this version supports 3.9 as well but let us not get ahead of ourselves, shall we. Invoking maintainer time-out. On a fully up-to-date ~amd64 system, the test phase passes for all four PYTHON_COMPAT entries. Closes: https://bugs.gentoo.org/706158 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/bsddb3')
-rw-r--r--dev-python/bsddb3/Manifest1
-rw-r--r--dev-python/bsddb3/bsddb3-6.2.7.ebuild76
2 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/bsddb3/Manifest b/dev-python/bsddb3/Manifest
index fbbd378d34af..6df7e3b2f617 100644
--- a/dev-python/bsddb3/Manifest
+++ b/dev-python/bsddb3/Manifest
@@ -1 +1,2 @@
DIST bsddb3-6.2.4.tar.gz 242397 BLAKE2B b6b9c6d4d3231bce400ae46a5df85abddd83bfd3e4e52d0192c2c91faab51af14946c9a8682f55ff8251fd0d1f7a00ba834d7a39c1574b4adcfe2ea396cf684d SHA512 15bb714242b05649a7c40ccd153979e596340ef039c89549b215fc5438a12fedb44150195063d2783c6c06ede3552506e31e8013b6b0431d27dd7e14975c08b0
+DIST bsddb3-6.2.7.tar.gz 437325 BLAKE2B ed7931a32766338c5674cc017a8528d30acf9397443f270bf93974c9ed7ae4abdc6b704d85d48f68e0c4b6d85c4ad71edf891e342e5f9b9a597453140adde742 SHA512 edd85fb697142ac152a10a299899c52b637a3b1e3d28d913c61f9de91ef292fc2055daeb18fca62242284b4189a61d5bf318aca6e2966849879043a46db000e0
diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
new file mode 100644
index 000000000000..d4b982c8a5e1
--- /dev/null
+++ b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
+PYTHON_REQ_USE="threads(+)"
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit db-use distutils-r1
+
+DESCRIPTION="Python bindings for Berkeley DB"
+HOMEPAGE="https://www.jcea.es/programacion/pybsddb.htm https://pypi.org/project/bsddb3/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ <sys-libs/db-6.3:=
+ || (
+ sys-libs/db:6.2
+ sys-libs/db:6.1
+ sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+python_prepare_all() {
+ # This list should be kept in sync with setup.py.
+ if [[ -z ${DB_VER} ]]; then
+ for DB_VER in 6.2 6.1 5.3 5.1 4.8 4.7; do
+ has_version "sys-libs/db:${DB_VER}" && break
+ done
+ fi
+
+ # Force version.
+ sed -e "s/db_ver = None/db_ver = (${DB_VER%.*}, ${DB_VER#*.})/" \
+ -e "s/dblib = 'db'/dblib = '$(db_libname ${DB_VER})'/" \
+ -i setup2.py setup3.py || die
+
+ # Adjust test.py to look in build/lib.
+ sed -e "s/'lib.%s' % PLAT_SPEC/'lib'/" \
+ -i test2.py test3.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ # These are needed for both build and install.
+ export BERKELEYDB_DIR="${EPREFIX}/usr"
+ export BERKELEYDB_INCDIR="$(db_includedir ${DB_VER})"
+ export BERKELEYDB_LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+ export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=1
+}
+
+python_compile() {
+ if ! python_is_python3; then
+ local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+ fi
+ distutils-r1_python_compile
+}
+
+python_test() {
+ if python_is_python3; then
+ PYTHONPATH=Lib3 "${EPYTHON}" test3.py -v || die "Testing failed with ${EPYTHON}"
+ else
+ PYTHONPATH=Lib "${EPYTHON}" test.py -v || die "Testing failed with ${EPYTHON}"
+ fi
+}