1 |
commit: 57fa37a94945b18e56f9f7637e532b24943df322 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 31 15:18:37 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 15:49:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57fa37a9 |
7 |
|
8 |
dev-python/twisted: Bump to 22.10.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/twisted/Manifest | 1 + |
13 |
dev-python/twisted/twisted-22.10.0.ebuild | 169 ++++++++++++++++++++++++++++++ |
14 |
2 files changed, 170 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest |
17 |
index 35a9df374cd8..ee684d792aa3 100644 |
18 |
--- a/dev-python/twisted/Manifest |
19 |
+++ b/dev-python/twisted/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
+DIST twisted-22.10.0.gh.tar.gz 3512714 BLAKE2B 2fd36ec6922f428e959ce0169bb9a3592b8b3e43aff8d34872883ecf0fad8d0fff01a52f06b54df3dc377f4fc1a488b6d66f9287b108b4749bb7d3c749b96061 SHA512 cf9ed96430376d499ae9627a7d0656c05cb99bc9e9b15a8f4166355363818f090bc3c2b383ed4cf19e1e38fb569e8618d35a0ddde2a90a06f3c9a4ea769837e4 |
22 |
DIST twisted-22.8.0.gh.tar.gz 3937858 BLAKE2B de5f56f2ac92db3ccd29122f3c3bacc01de325e4b00b60a0ea9bcf13c5714487d596299990d292758821e242443d8c65cda03b895196df0a635b0739f08668fc SHA512 890a11ca55fd88636f404678c6fad3fcea9d0604b1b37681a4b92ea74952bc4d1b96a571dde39a4aa82d966121156801f6b42dbd0bb5a309503591a7a77c6d71 |
23 |
DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03 |
24 |
|
25 |
diff --git a/dev-python/twisted/twisted-22.10.0.ebuild b/dev-python/twisted/twisted-22.10.0.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..c2dd189537da |
28 |
--- /dev/null |
29 |
+++ b/dev-python/twisted/twisted-22.10.0.ebuild |
30 |
@@ -0,0 +1,169 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+DISTUTILS_USE_PEP517=setuptools |
37 |
+PYTHON_COMPAT=( python3_{8..11} pypy3 ) |
38 |
+PYTHON_REQ_USE="threads(+)" |
39 |
+ |
40 |
+inherit distutils-r1 virtualx |
41 |
+ |
42 |
+DESCRIPTION="An asynchronous networking framework written in Python" |
43 |
+HOMEPAGE="https://www.twistedmatrix.com/trac/" |
44 |
+SRC_URI=" |
45 |
+ https://github.com/twisted/twisted/archive/${P}.tar.gz -> ${P}.gh.tar.gz |
46 |
+ https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz |
47 |
+" |
48 |
+S=${WORKDIR}/${PN}-${P} |
49 |
+ |
50 |
+LICENSE="MIT" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
53 |
+IUSE="conch http2 serial ssl test" |
54 |
+RESTRICT="!test? ( test )" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] |
58 |
+ >=dev-python/automat-0.8.0[${PYTHON_USEDEP}] |
59 |
+ >=dev-python/constantly-15.1[${PYTHON_USEDEP}] |
60 |
+ >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}] |
61 |
+ >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] |
62 |
+ >=dev-python/typing-extensions-3.6.5[${PYTHON_USEDEP}] |
63 |
+ >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}] |
64 |
+ conch? ( |
65 |
+ >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] |
66 |
+ >=dev-python/bcrypt-3.0.0[${PYTHON_USEDEP}] |
67 |
+ >=dev-python/cryptography-2.6[${PYTHON_USEDEP}] |
68 |
+ dev-python/pyasn1[${PYTHON_USEDEP}] |
69 |
+ ) |
70 |
+ http2? ( |
71 |
+ <dev-python/h2-5.0.0[${PYTHON_USEDEP}] |
72 |
+ >=dev-python/h2-3.0.0[${PYTHON_USEDEP}] |
73 |
+ <dev-python/priority-2.0[${PYTHON_USEDEP}] |
74 |
+ >=dev-python/priority-1.1.0[${PYTHON_USEDEP}] |
75 |
+ ) |
76 |
+ serial? ( |
77 |
+ >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] |
78 |
+ ) |
79 |
+ ssl? ( |
80 |
+ >=dev-python/pyopenssl-21.0.0[${PYTHON_USEDEP}] |
81 |
+ >=dev-python/service_identity-18.1.0[${PYTHON_USEDEP}] |
82 |
+ >=dev-python/idna-2.4[${PYTHON_USEDEP}] |
83 |
+ ) |
84 |
+" |
85 |
+BDEPEND=" |
86 |
+ >=dev-python/incremental-21.3.0[${PYTHON_USEDEP}] |
87 |
+ test? ( |
88 |
+ $(python_gen_cond_dep ' |
89 |
+ >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}] |
90 |
+ >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}] |
91 |
+ >=dev-python/cython-test-exception-raiser-1.0.2[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/idna-2.4[${PYTHON_USEDEP}] |
93 |
+ dev-python/hypothesis[${PYTHON_USEDEP}] |
94 |
+ dev-python/pyasn1[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}] |
96 |
+ >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] |
97 |
+ net-misc/openssh |
98 |
+ conch? ( |
99 |
+ >=dev-python/bcrypt-3.0.0[${PYTHON_USEDEP}] |
100 |
+ >=dev-python/cryptography-2.6[${PYTHON_USEDEP}] |
101 |
+ ) |
102 |
+ ssl? ( |
103 |
+ >=dev-python/pyopenssl-21.0.0[${PYTHON_USEDEP}] |
104 |
+ >=dev-python/service_identity-18.1.0[${PYTHON_USEDEP}] |
105 |
+ ) |
106 |
+ ' python3_{8..10} pypy3) |
107 |
+ $(python_gen_cond_dep ' |
108 |
+ dev-python/gmpy[${PYTHON_USEDEP}] |
109 |
+ ' python3_{8..10}) |
110 |
+ ) |
111 |
+" |
112 |
+ |
113 |
+PATCHES=( |
114 |
+ # https://twistedmatrix.com/trac/ticket/10200 |
115 |
+ "${FILESDIR}/${PN}-22.1.0-force-gtk3.patch" |
116 |
+) |
117 |
+ |
118 |
+python_prepare_all() { |
119 |
+ # upstream test for making releases; not very useful and requires |
120 |
+ # sphinx (including on py2) |
121 |
+ rm src/twisted/python/test/test_release.py || die |
122 |
+ |
123 |
+ # puts system in EMFILE state, then the exception handler may fail |
124 |
+ # trying to open more files due to some gi magic |
125 |
+ sed -e '/SKIP_EMFILE/s:False:True:' \ |
126 |
+ -i src/twisted/internet/test/test_tcp.py || die |
127 |
+ |
128 |
+ # multicast tests fail within network-sandbox |
129 |
+ sed -e 's:test_joinLeave:_&:' \ |
130 |
+ -e 's:test_loopback:_&:' \ |
131 |
+ -e 's:test_multiListen:_&:' \ |
132 |
+ -e 's:test_multicast:_&:' \ |
133 |
+ -i src/twisted/test/test_udp.py || die |
134 |
+ |
135 |
+ # These tests rely on warnings which seems work unreliably between python versions |
136 |
+ sed -e 's:test_currentEUID:_&:' \ |
137 |
+ -e 's:test_currentUID:_&:' -i src/twisted/python/test/test_util.py || die |
138 |
+ |
139 |
+ # broken by new expat |
140 |
+ sed -e 's:test_namespaceWithWhitespace:_&:' \ |
141 |
+ -i src/twisted/words/test/test_domish.py || die |
142 |
+ |
143 |
+ distutils-r1_python_prepare_all |
144 |
+} |
145 |
+ |
146 |
+src_test() { |
147 |
+ # the test suite handles missing file & failing ioctl()s gracefully |
148 |
+ # but not permission errors from sandbox |
149 |
+ addwrite /dev/net/tun |
150 |
+ virtx distutils-r1_src_test |
151 |
+} |
152 |
+ |
153 |
+python_test() { |
154 |
+ # please keep in sync with python_gen_cond_dep! |
155 |
+ if ! has "${EPYTHON}" python3_{8..10} pypy3; then |
156 |
+ einfo "Skipping tests on ${EPYTHON} (xfail)" |
157 |
+ return |
158 |
+ fi |
159 |
+ |
160 |
+ "${EPYTHON}" -m twisted.trial twisted || |
161 |
+ die "Tests failed with ${EPYTHON}" |
162 |
+} |
163 |
+ |
164 |
+python_install() { |
165 |
+ distutils-r1_python_install |
166 |
+ |
167 |
+ # own the dropin.cache so we don't leave orphans |
168 |
+ > "${D}$(python_get_sitedir)"/twisted/plugins/dropin.cache || die |
169 |
+ |
170 |
+ python_doscript "${WORKDIR}"/twisted-regen-cache |
171 |
+} |
172 |
+ |
173 |
+python_install_all() { |
174 |
+ distutils-r1_python_install_all |
175 |
+ |
176 |
+ newconfd "${FILESDIR}/twistd.conf" twistd |
177 |
+ newinitd "${FILESDIR}/twistd.init" twistd |
178 |
+} |
179 |
+ |
180 |
+python_postinst() { |
181 |
+ twisted-regen-cache || die |
182 |
+} |
183 |
+ |
184 |
+pkg_postinst() { |
185 |
+ if [[ -z ${ROOT} ]]; then |
186 |
+ python_foreach_impl python_postinst |
187 |
+ fi |
188 |
+} |
189 |
+ |
190 |
+python_postrm() { |
191 |
+ rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die |
192 |
+} |
193 |
+ |
194 |
+pkg_postrm() { |
195 |
+ # if we're removing the last version, remove the cache file |
196 |
+ if [[ ! ${REPLACING_VERSIONS} ]]; then |
197 |
+ python_foreach_impl python_postrm |
198 |
+ fi |
199 |
+} |