From 783231c88e5a7ed3d40a6a8998a87d411f1d8579 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 14 Dec 2020 05:20:46 +0000 Subject: dev-python/eventlet: bump to 0.30.0 Restore inadvertently dropped Python implementations too. Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Sam James --- dev-python/eventlet/Manifest | 2 +- dev-python/eventlet/eventlet-0.29.1.ebuild | 64 ------------------- dev-python/eventlet/eventlet-0.30.0.ebuild | 65 ++++++++++++++++++++ .../eventlet/files/eventlet-0.29.1-tests.patch | 71 ---------------------- .../files/eventlet-0.30.0-tests-socket.patch | 13 ++++ 5 files changed, 79 insertions(+), 136 deletions(-) delete mode 100644 dev-python/eventlet/eventlet-0.29.1.ebuild create mode 100644 dev-python/eventlet/eventlet-0.30.0.ebuild delete mode 100644 dev-python/eventlet/files/eventlet-0.29.1-tests.patch create mode 100644 dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch (limited to 'dev-python/eventlet') diff --git a/dev-python/eventlet/Manifest b/dev-python/eventlet/Manifest index 9ba86992d664..d60a7b85c864 100644 --- a/dev-python/eventlet/Manifest +++ b/dev-python/eventlet/Manifest @@ -1,2 +1,2 @@ DIST eventlet-0.26.1.tar.gz 398200 BLAKE2B f14024d0825fb5530929766c63dceea7446057d9ad5dfb98ab013e96cab9b0eef5440f2d4d7ceeef17691c8a2a9055cac2b93fb23653a6facba4967c4e7cb0b3 SHA512 55b9b214130d0482ea005ea570a5aa3eafdf66e6d315a95c5ba60186a2d9a9df5c2638c86d886968954ce39e5ac2153e1f9e11631e6aef237078c3776af7d6c5 -DIST eventlet-0.29.1.tar.gz 400673 BLAKE2B 2b317e0c445a7b9c7f96147c033b1a6b4b4d27eeaebe0d40102b4e25d7825861db15e9d77cf6c9e6795e1bc946b1a613d5bb4ffa60a7077c39d575f01bdd8506 SHA512 194544e8fafeb0847673abd84c8fbc876bb407bb76cb86c5a8a92fdb7571d3585e895f0063375e43b74de81b47e49cd6002f5b7a4f266d37bacc1b23e9ce4ef3 +DIST eventlet-0.30.0.tar.gz 401035 BLAKE2B 94a272ce810b28c00fc8a468f160e38f3c58c98750455e5eb096c266c46257a7e30e0278a6a8f509e47e6ab40297129ccf52b347a723037f9cc9b85a3e06a203 SHA512 c2ba283063333e9e74536dcda33276f98f74051ea0e9c8669506d2e3b11715f37cd5963af6130f14761a42cc6c8346e59c756efe2cef0ea3547dc30ccb8bf0fb diff --git a/dev-python/eventlet/eventlet-0.29.1.ebuild b/dev-python/eventlet/eventlet-0.29.1.ebuild deleted file mode 100644 index c1a6a203dce2..000000000000 --- a/dev-python/eventlet/eventlet-0.29.1.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_9 ) -inherit distutils-r1 - -DESCRIPTION="Highly concurrent networking library" -HOMEPAGE="https://pypi.org/project/eventlet/ https://github.com/eventlet/eventlet/" -SRC_URI="mirror://pypi/e/${PN}/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="doc examples test" - -RDEPEND=" - >=dev-python/dnspython-1.15.0[${PYTHON_USEDEP}] - =dev-python/greenlet-0.3[${PYTHON_USEDEP}] - >=dev-python/monotonic-1.4[${PYTHON_USEDEP}] - >=dev-python/six-1.10.0[${PYTHON_USEDEP}]" -DEPEND="doc? ( >=dev-python/python-docs-2.7.6-r1:2.7 ) - test? ( ${RDEPEND} - dev-python/pyopenssl[${PYTHON_USEDEP}] - dev-python/nose[${PYTHON_USEDEP}] )" - -PATCHES=( - "${FILESDIR}/eventlet-0.25.1-tests.patch" - "${FILESDIR}/${P}-tests.patch" -) - -distutils_enable_sphinx doc -distutils_enable_tests nose - -python_prepare_all() { - if use doc; then - local PYTHON_DOC_ATOM=$(best_version -b dev-python/python-docs:2.7) - local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}" - local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html" - local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv" - sed -i "s|'https://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" doc/conf.py || die - fi - - # Prevent file collisions from teestsuite - sed -e "s:'tests', :'tests', 'tests.*', :" -i setup.py || die - - distutils-r1_python_prepare_all -} - -python_test() { - unset PYTHONPATH - nosetests -v || die -} - -python_install_all() { - if use examples; then - docompress -x "/usr/share/doc/${PF}/examples" - docinto examples - dodoc -r examples/. - fi - distutils-r1_python_install_all -} diff --git a/dev-python/eventlet/eventlet-0.30.0.ebuild b/dev-python/eventlet/eventlet-0.30.0.ebuild new file mode 100644 index 000000000000..bce0a6cda427 --- /dev/null +++ b/dev-python/eventlet/eventlet-0.30.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9} ) +inherit distutils-r1 + +DESCRIPTION="Highly concurrent networking library" +HOMEPAGE="https://pypi.org/project/eventlet/ https://github.com/eventlet/eventlet/" +SRC_URI="mirror://pypi/e/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="doc examples test" + +RDEPEND=" + >=dev-python/dnspython-1.15.0[${PYTHON_USEDEP}] + =dev-python/greenlet-0.3[${PYTHON_USEDEP}] + >=dev-python/monotonic-1.4[${PYTHON_USEDEP}] + >=dev-python/six-1.10.0[${PYTHON_USEDEP}]" +DEPEND="doc? ( >=dev-python/python-docs-2.7.6-r1:2.7 ) + test? ( ${RDEPEND} + dev-python/pyopenssl[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-0.25.1-tests.patch" + "${FILESDIR}/${PN}-0.30.0-tests-socket.patch" +) + +distutils_enable_sphinx doc +distutils_enable_tests nose + +python_prepare_all() { + if use doc; then + local PYTHON_DOC_ATOM=$(best_version -b dev-python/python-docs:2.7) + local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}" + local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html" + local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv" + sed -i "s|'https://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" doc/conf.py || die + fi + + # Prevent file collisions from teestsuite + sed -e "s:'tests', :'tests', 'tests.*', :" -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + unset PYTHONPATH + export TMPDIR="${T}" + nosetests -v || die +} + +python_install_all() { + if use examples; then + docompress -x "/usr/share/doc/${PF}/examples" + docinto examples + dodoc -r examples/. + fi + distutils-r1_python_install_all +} diff --git a/dev-python/eventlet/files/eventlet-0.29.1-tests.patch b/dev-python/eventlet/files/eventlet-0.29.1-tests.patch deleted file mode 100644 index 3cd20823899d..000000000000 --- a/dev-python/eventlet/files/eventlet-0.29.1-tests.patch +++ /dev/null @@ -1,71 +0,0 @@ -https://github.com/eventlet/eventlet/issues/646 -From 087ba743c7af8a40ac1e4e2ec89409eee3b4233e Mon Sep 17 00:00:00 2001 -From: Tim Burke -Date: Mon, 2 Nov 2020 16:09:46 -0800 -Subject: [PATCH] py39: Add _at_fork_reinit method to Semaphores - -CPython expects to be able to call such a method on RLocks, Conditions, -and Events in threading; since we may monkey-patch threading to use -Semaphores as locks, they need the method, too. - -Addresses #646 ---- - eventlet/semaphore.py | 5 +++++ - tests/semaphore_test.py | 21 +++++++++++++++++++++ - 2 files changed, 26 insertions(+) - -diff --git a/eventlet/semaphore.py b/eventlet/semaphore.py -index 18b5b05f4..5e2b5e32f 100644 ---- a/eventlet/semaphore.py -+++ b/eventlet/semaphore.py -@@ -39,6 +39,7 @@ def __init__(self, value=1): - if value < 0: - msg = 'Semaphore() expect value >= 0, actual: {0}'.format(repr(value)) - raise ValueError(msg) -+ self._original_value = value - self.counter = value - self._waiters = collections.deque() - -@@ -51,6 +52,10 @@ def __str__(self): - params = (self.__class__.__name__, self.counter, len(self._waiters)) - return '<%s c=%s _w[%s]>' % params - -+ def _at_fork_reinit(self): -+ self.counter = self._original_value -+ self._waiters.clear() -+ - def locked(self): - """Returns true if a call to acquire would block. - """ -diff --git a/tests/semaphore_test.py b/tests/semaphore_test.py -index d6c11d1f6..cf6a29daf 100644 ---- a/tests/semaphore_test.py -+++ b/tests/semaphore_test.py -@@ -42,6 +42,27 @@ def test_timeout_non_blocking(self): - sem = eventlet.Semaphore() - self.assertRaises(ValueError, sem.acquire, blocking=False, timeout=1) - -+ def test_reinit(self): -+ # py39+ expects locks to have a _at_fork_reinit() method; since we -+ # patch in Semaphores in eventlet.green.thread, they need it, too -+ sem = eventlet.Semaphore() -+ sem.acquire() -+ sem._at_fork_reinit() -+ self.assertEqual(sem.acquire(blocking=False), True) -+ self.assertEqual(sem.acquire(blocking=False), False) -+ -+ sem = eventlet.Semaphore(0) -+ sem.release() -+ sem._at_fork_reinit() -+ self.assertEqual(sem.acquire(blocking=False), False) -+ -+ sem = eventlet.Semaphore(2) -+ sem.acquire() -+ sem._at_fork_reinit() -+ self.assertEqual(sem.acquire(blocking=False), True) -+ self.assertEqual(sem.acquire(blocking=False), True) -+ self.assertEqual(sem.acquire(blocking=False), False) -+ - - def test_semaphore_contention(): - g_mutex = eventlet.Semaphore() diff --git a/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch b/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch new file mode 100644 index 000000000000..4dd309c68a38 --- /dev/null +++ b/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch @@ -0,0 +1,13 @@ +Let's use TMPDIR as the base for this test's unix socket to help it pass. +We set TMPDIR in the ebuild to ${T}. +--- a/tests/backdoor_test.py ++++ b/tests/backdoor_test.py +@@ -47,7 +47,7 @@ class BackdoorTest(tests.LimitedTestCase): + self._run_test_on_client_and_server(client, serv) + + def test_server_on_unix_socket(self): +- SOCKET_PATH = '/tmp/eventlet_backdoor_test.socket' ++ SOCKET_PATH = os.getenv('TMPDIR', '/tmp') + '/eventlet_backdoor_test.socket' + if os.path.exists(SOCKET_PATH): + os.unlink(SOCKET_PATH) + listener = socket.socket(socket.AF_UNIX) -- cgit v1.2.3-65-gdbad