1 |
commit: acdd702a0ab8ee0ef92e7a4420b6d6de3f2ef942 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 13 08:20:42 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 13 09:08:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acdd702a |
7 |
|
8 |
www-servers/tornado: EAPI 8, PEP517 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
www-servers/tornado/tornado-6.1-r1.ebuild | 68 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 68 insertions(+) |
14 |
|
15 |
diff --git a/www-servers/tornado/tornado-6.1-r1.ebuild b/www-servers/tornado/tornado-6.1-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..d9618f938317 |
18 |
--- /dev/null |
19 |
+++ b/www-servers/tornado/tornado-6.1-r1.ebuild |
20 |
@@ -0,0 +1,68 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+DISTUTILS_USE_PEP517=setuptools |
27 |
+PYTHON_COMPAT=( python3_{8..10} ) |
28 |
+PYTHON_REQ_USE="threads(+)" |
29 |
+ |
30 |
+inherit distutils-r1 |
31 |
+ |
32 |
+DESCRIPTION="Python web framework and asynchronous networking library" |
33 |
+HOMEPAGE=" |
34 |
+ https://www.tornadoweb.org/ |
35 |
+ https://github.com/tornadoweb/tornado/ |
36 |
+ https://pypi.org/project/tornado/ |
37 |
+" |
38 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="Apache-2.0" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" |
43 |
+IUSE="examples test" |
44 |
+RESTRICT="!test? ( test )" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ >=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}] |
48 |
+ >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] |
49 |
+" |
50 |
+BDEPEND=" |
51 |
+ test? ( |
52 |
+ ${RDEPEND} |
53 |
+ ) |
54 |
+" |
55 |
+ |
56 |
+distutils_enable_sphinx docs \ |
57 |
+ dev-python/sphinx_rtd_theme \ |
58 |
+ dev-python/sphinxcontrib-asyncio |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ # Disable deprecation-warnings-as-errors because tornado has a lot of stuff deprecated in 3.10 |
62 |
+ sed 's/warnings.filterwarnings("error", category=DeprecationWarning, module=r"tornado\\..*")//' \ |
63 |
+ -i tornado/test/runtests.py || die |
64 |
+ # broken upstream |
65 |
+ sed -i -e 's:test_multi_line_headers:_&:' \ |
66 |
+ tornado/test/httpclient_test.py || die |
67 |
+ # network-sandbox? ipv6? |
68 |
+ sed -i -e 's:test_localhost:_&:' \ |
69 |
+ tornado/test/netutil_test.py || die |
70 |
+ |
71 |
+ distutils-r1_src_prepare |
72 |
+} |
73 |
+ |
74 |
+python_test() { |
75 |
+ local -x ASYNC_TEST_TIMEOUT=60 |
76 |
+ cd "${T}" || die |
77 |
+ "${EPYTHON}" -m tornado.test.runtests --verbose || |
78 |
+ die "tests failed under ${EPYTHON}" |
79 |
+} |
80 |
+ |
81 |
+python_install_all() { |
82 |
+ if use examples; then |
83 |
+ docinto examples |
84 |
+ dodoc -r demos/. |
85 |
+ docompress -x /usr/share/doc/${PF}/examples |
86 |
+ fi |
87 |
+ distutils-r1_python_install_all |
88 |
+} |