summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-18 12:49:37 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-18 14:22:45 +0200
commit3fec27b1999c4a84232065f2bb4cb74c3f8f2857 (patch)
tree37d445bd0e9a7da71c09af90b709a6086b40b467 /dev-python/bsddb3
parentdev-python/isodate: Port to py3.9 (diff)
downloadgentoo-3fec27b1999c4a84232065f2bb4cb74c3f8f2857.tar.gz
gentoo-3fec27b1999c4a84232065f2bb4cb74c3f8f2857.tar.bz2
gentoo-3fec27b1999c4a84232065f2bb4cb74c3f8f2857.zip
dev-python/bsddb3: Port to py3.9
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/bsddb3')
-rw-r--r--dev-python/bsddb3/bsddb3-6.2.7.ebuild11
-rw-r--r--dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch19
2 files changed, 26 insertions, 4 deletions
diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
index 2636c7c14f52..d217d17a5f11 100644
--- a/dev-python/bsddb3/bsddb3-6.2.7.ebuild
+++ b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=no
@@ -27,11 +27,14 @@ RDEPEND="
sys-libs/db:4.8
sys-libs/db:4.7
)"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
DISTUTILS_IN_SOURCE_BUILD=1
+PATCHES=(
+ "${FILESDIR}"/${P}-py39.patch
+)
+
python_prepare_all() {
# This list should be kept in sync with setup.py.
if [[ -z ${DB_VER} ]]; then
diff --git a/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch b/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
new file mode 100644
index 000000000000..77d4626912af
--- /dev/null
+++ b/dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch
@@ -0,0 +1,19 @@
+diff --git a/Lib3/bsddb/test/test_replication.py b/Lib3/bsddb/test/test_replication.py
+index 2fd6aa0..9d78241 100644
+--- a/Lib3/bsddb/test/test_replication.py
++++ b/Lib3/bsddb/test/test_replication.py
+@@ -105,8 +105,12 @@ class DBReplication(unittest.TestCase) :
+
+ class DBReplicationManager(DBReplication) :
+ def test01_basic_replication(self) :
+- master_port = test_support.find_unused_port()
+- client_port = test_support.find_unused_port()
++ try:
++ from test.support.socket_helper import find_unused_port
++ except ImportError:
++ find_unused_port = test_support.find_unused_port
++ master_port = find_unused_port()
++ client_port = find_unused_port()
+ if db.version() >= (5, 2) :
+ self.site = self.dbenvMaster.repmgr_site("127.0.0.1", master_port)
+ self.site.set_config(db.DB_GROUP_CREATOR, True)