diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild b/dev-python/bsddb3/bsddb3-6.2.7.ebuild index 2636c7c14f52a..d217d17a5f115 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 0000000000000..77d4626912af2 --- /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)