diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-21 16:00:56 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-21 16:21:06 +0300 |
commit | edf9a0460342a9296c63febb454ee749f0875628 (patch) | |
tree | 6c928a0c355680e0999285db9d48e13fc1b23f8a /dev-python/berkeleydb | |
parent | www-apache/mod_qos: 11.68 version bump (diff) | |
download | gentoo-edf9a0460342a9296c63febb454ee749f0875628.tar.gz gentoo-edf9a0460342a9296c63febb454ee749f0875628.tar.bz2 gentoo-edf9a0460342a9296c63febb454ee749f0875628.zip |
dev-python/berkeleydb: initial import (NIH dep for dev-python/rdflib)
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/berkeleydb')
-rw-r--r-- | dev-python/berkeleydb/Manifest | 1 | ||||
-rw-r--r-- | dev-python/berkeleydb/berkeleydb-18.1.4.ebuild | 62 | ||||
-rw-r--r-- | dev-python/berkeleydb/metadata.xml | 11 |
3 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/berkeleydb/Manifest b/dev-python/berkeleydb/Manifest new file mode 100644 index 000000000000..486f8088b1e8 --- /dev/null +++ b/dev-python/berkeleydb/Manifest @@ -0,0 +1 @@ +DIST berkeleydb-18.1.4.tar.xz 137160 BLAKE2B c93e7707bf12199c8161112accfedc3b0180b8f6edcf5c928c03f373528bb9ccb23219865344d9ed29d30b0133a2161ba0325257b6f7a2d22a58e8d9b1f82ce2 SHA512 bac2848e82ba5fdd3ca8fbf3a02d04faf270132f4b9fe93096ea57ab99fcc7eba02ff8a9638ea8e028d8bd4f16eebbefb65f33ea67e95c0a14cced05d04b23b8 diff --git a/dev-python/berkeleydb/berkeleydb-18.1.4.ebuild b/dev-python/berkeleydb/berkeleydb-18.1.4.ebuild new file mode 100644 index 000000000000..5aa0f547bd67 --- /dev/null +++ b/dev-python/berkeleydb/berkeleydb-18.1.4.ebuild @@ -0,0 +1,62 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="threads(+)" +DISTUTILS_IN_SOURCE_BUILD=1 +inherit db-use distutils-r1 + +# Tests aren't included in PyPi tarballs, so just manually clone from upstream +# at https://hg.jcea.es/pybsddb/ and prepare out tarball + +DESCRIPTION="Python bindings for Oracle Berkeley DB" +HOMEPAGE="https://www.jcea.es/programacion/pybsddb.htm https://pypi.org/project/berkeleydb/" +SRC_URI="https://dev.gentoo.org/~arthurzam/distfiles/dev-python/${PN}/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + || ( + sys-libs/db:6.2 + sys-libs/db:5.3 + sys-libs/db:4.8 + )" +DEPEND="${RDEPEND}" + +python_prepare_all() { + # This list should be kept in sync with setup3.py. + if [[ -z ${DB_VER} ]]; then + for DB_VER in 6.2 5.3 4.8; 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 setup3.py || die + + # rename to bypass name conflict with builtin test module + mv test.py test3.py || die + + # Adjust test3.py to look in build/lib. + sed -e "s/'lib.%s' % PLAT_SPEC/'lib'/" -i 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_test() { + "${EPYTHON}" test3.py -vv || die "Testing failed with ${EPYTHON}" +} diff --git a/dev-python/berkeleydb/metadata.xml b/dev-python/berkeleydb/metadata.xml new file mode 100644 index 000000000000..13dbb5909e0a --- /dev/null +++ b/dev-python/berkeleydb/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>arthurzam@gentoo.org</email> + <name>Arthur Zamarin</name> + </maintainer> + <upstream> + <remote-id type="pypi">berkeleydb</remote-id> + </upstream> +</pkgmetadata> |