commit:     3fec27b1999c4a84232065f2bb4cb74c3f8f2857
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 18 10:49:37 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 18 12:22:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fec27b1

dev-python/bsddb3: Port to py3.9

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 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(-)

diff --git a/dev-python/bsddb3/bsddb3-6.2.7.ebuild 
b/dev-python/bsddb3/bsddb3-6.2.7.ebuild
index 2636c7c14f5..d217d17a5f1 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 00000000000..77d4626912a
--- /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)

Reply via email to