1 |
commit: d968c6d9916bca88900c240bb26874ba93b6e3aa |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 5 16:23:46 2022 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 5 16:23:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d968c6d9 |
7 |
|
8 |
dev-python/rpyc: Make gevent optional |
9 |
|
10 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
11 |
|
12 |
dev-python/rpyc/metadata.xml | 2 + |
13 |
dev-python/rpyc/rpyc-5.2.3-r3.ebuild | 71 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 73 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/rpyc/metadata.xml b/dev-python/rpyc/metadata.xml |
17 |
index 9bb47af5f2a2..0cc85787c0c5 100644 |
18 |
--- a/dev-python/rpyc/metadata.xml |
19 |
+++ b/dev-python/rpyc/metadata.xml |
20 |
@@ -15,6 +15,8 @@ |
21 |
<flag name="numpy">Run tests depending on |
22 |
<pkg>dev-python/numpy</pkg>, <pkg>dev-python/pandas</pkg> |
23 |
</flag> |
24 |
+ <flag name="gevent">Use <pkg>dev-python/gevent</pkg> for GeventServer |
25 |
+ </flag> |
26 |
<flag name="gdb">Run tests depending on <pkg>sys-devel/gdb</pkg> |
27 |
</flag> |
28 |
</use> |
29 |
|
30 |
diff --git a/dev-python/rpyc/rpyc-5.2.3-r3.ebuild b/dev-python/rpyc/rpyc-5.2.3-r3.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..457166812a05 |
33 |
--- /dev/null |
34 |
+++ b/dev-python/rpyc/rpyc-5.2.3-r3.ebuild |
35 |
@@ -0,0 +1,71 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
40 |
+DISTUTILS_USE_PEP517=hatchling |
41 |
+PYTHON_COMPAT=( python3_{8..10} ) |
42 |
+# Teleporting currently does not work with python-3.11 |
43 |
+# see https://github.com/tomerfiliba-org/rpyc/issues/513 |
44 |
+ |
45 |
+inherit distutils-r1 |
46 |
+ |
47 |
+DESCRIPTION="Remote Python Call (RPyC), a transparent and symmetric RPC library" |
48 |
+HOMEPAGE="https://rpyc.readthedocs.io/en/latest/ |
49 |
+ https://pypi.org/project/rpyc/ |
50 |
+ https://github.com/tomerfiliba-org/rpyc" |
51 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
52 |
+ |
53 |
+LICENSE="MIT" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64 ~x86" |
56 |
+ |
57 |
+# USE flags gdb, numpy are used *only* to run tests depending on these packages |
58 |
+IUSE="test numpy gdb gevent" |
59 |
+RESTRICT="!test? ( test )" |
60 |
+ |
61 |
+CDEPEND="numpy? ( dev-python/numpy[${PYTHON_USEDEP}] dev-python/pandas[${PYTHON_USEDEP}] ) |
62 |
+ gevent? ( dev-python/gevent[${PYTHON_USEDEP}] ) |
63 |
+ gdb? ( sys-devel/gdb )" |
64 |
+ |
65 |
+DEPEND="${CDEPEND} |
66 |
+ dev-python/setuptools[${PYTHON_USEDEP}]" |
67 |
+ |
68 |
+RDEPEND="${CDEPEND} |
69 |
+ dev-python/plumbum[${PYTHON_USEDEP}]" |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ |
74 |
+ # Windows specific test |
75 |
+ rm tests/test_win32pipes.py || die "rm tests/test_win32pipes.py failed" |
76 |
+ |
77 |
+ # These tests require running sshd |
78 |
+ rm tests/test_ssh.py tests/test_deploy.py || die "rm test_ssh.py test_deploy.py failed" |
79 |
+ |
80 |
+ # This test requires internet access |
81 |
+ rm tests/test_registry.py || die "rm test_registry.py failed" |
82 |
+ |
83 |
+ # This test fails with NO_CIPHERS_AVAILABLE |
84 |
+ rm tests/test_ssl.py || die "rm test_ssl.py failed" |
85 |
+ |
86 |
+ if ! use numpy |
87 |
+ then rm tests/test_service_pickle.py || die "rm test_service_pickle.py failed" |
88 |
+ fi |
89 |
+ |
90 |
+ if ! use gevent |
91 |
+ then rm tests/test_gevent_server.py || die "rm test_gevent_server.py failed" |
92 |
+ fi |
93 |
+ |
94 |
+ if ! use gdb |
95 |
+ then rm tests/test_gdb.py || die "rm test_gdb.py failed" |
96 |
+ fi |
97 |
+} |
98 |
+ |
99 |
+python_test() { |
100 |
+ # for some reason, when tests are run via pytest or nose, some of them hung |
101 |
+ pushd tests > /dev/null || die "pushd tests failed" |
102 |
+ for x in test_*.py |
103 |
+ do PYTHONPATH="${WORKDIR}"/${P}-${EPYTHON/./_}/install/usr/lib/${EPYTHON}/site-packages ${EPYTHON} ${x} || die "${x} failed" |
104 |
+ done |
105 |
+ popd > /dev/null |
106 |
+} |