From 3fec27b1999c4a84232065f2bb4cb74c3f8f2857 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 18 Jun 2020 12:49:37 +0200 Subject: dev-python/bsddb3: Port to py3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/bsddb3/bsddb3-6.2.7.ebuild | 11 +++++++---- dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 dev-python/bsddb3/files/bsddb3-6.2.7-py39.patch (limited to 'dev-python/bsddb3') 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) -- cgit v1.2.3-65-gdbad