Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-engineio/
Date: Thu, 28 Apr 2022 04:05:35
Message-Id: 1651118673.c22f72dbf15297a6da50606a02130833f982de07.sam@gentoo
1 commit: c22f72dbf15297a6da50606a02130833f982de07
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 04:04:33 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 04:04:33 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c22f72db
7
8 dev-python/python-engineio: avoid eventlet test dependency; add Python 3.10
9
10 We can avoid the eventlet test dep (which doesn't support Python 3.10 yet, still!)
11 with some gymnastics.
12
13 engineio supports a bunch of event engines, so let's just use others for testing
14 (and indeed use eventlet when it's available for < Python 3.10).
15
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 .../python-engineio-4.3.2-r1.ebuild | 66 ++++++++++++++++++++++
19 1 file changed, 66 insertions(+)
20
21 diff --git a/dev-python/python-engineio/python-engineio-4.3.2-r1.ebuild b/dev-python/python-engineio/python-engineio-4.3.2-r1.ebuild
22 new file mode 100644
23 index 000000000000..a7da39134dd9
24 --- /dev/null
25 +++ b/dev-python/python-engineio/python-engineio-4.3.2-r1.ebuild
26 @@ -0,0 +1,66 @@
27 +# Copyright 1999-2022 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=8
31 +
32 +DISTUTILS_USE_PEP517=setuptools
33 +PYTHON_COMPAT=( python3_{8..10} )
34 +inherit distutils-r1
35 +
36 +DESCRIPTION="Python implementation of the Engine.IO realtime server"
37 +HOMEPAGE="
38 + https://python-engineio.readthedocs.io/
39 + https://github.com/miguelgrinberg/python-engineio/
40 + https://pypi.org/project/python-engineio/"
41 +SRC_URI="
42 + https://github.com/miguelgrinberg/python-engineio/archive/v${PV}.tar.gz
43 + -> ${P}.gh.tar.gz
44 +"
45 +
46 +LICENSE="MIT"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~x86"
49 +
50 +RDEPEND="
51 + dev-python/aiohttp[${PYTHON_USEDEP}]
52 + dev-python/requests[${PYTHON_USEDEP}]
53 +"
54 +# Can use eventlet, werkzeug, or gevent, but no tests for werkzeug
55 +# eventlet doesn't yet support Python 3.10, so let's work around it
56 +BDEPEND="
57 + test? (
58 + $(python_gen_cond_dep '
59 + dev-python/eventlet[${PYTHON_USEDEP}]
60 + ' python3_{8,9} )
61 +
62 + dev-python/gevent[${PYTHON_USEDEP}]
63 + dev-python/websockets[${PYTHON_USEDEP}]
64 + www-servers/tornado[${PYTHON_USEDEP}]
65 + )
66 +"
67 +
68 +EPYTEST_DESELECT=(
69 + # Both want websocket (server) which isn't strictly required and fails
70 + # because it can't find it. Think it needs right provider depending on
71 + # whether it chose gevent/eventlet/werkzeug. Not worth the effort.
72 + tests/common/test_server.py::TestServer::test_connect
73 + tests/common/test_server.py::TestServer::test_upgrades
74 +)
75 +
76 +distutils_enable_tests pytest
77 +distutils_enable_sphinx docs \
78 + dev-python/alabaster
79 +
80 +python_test() {
81 + if [[ ${EPYTHON} != python3.8 && ${EPYTHON} != python3.9 ]] ; then
82 + EPYTEST_IGNORE+=(
83 + tests/common/test_async_eventlet.py
84 + )
85 +
86 + EPYTEST_DESELECT+=(
87 + tests/common/test_server.py::TestServer::test_async_mode_eventlet
88 + )
89 + fi
90 +
91 + epytest
92 +}