Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twisted/
Date: Sun, 28 Feb 2021 21:09:24
Message-Id: 1614546558.9156353647f09548498d0ceb6850a4672d8a15d7.mgorny@gentoo
1 commit: 9156353647f09548498d0ceb6850a4672d8a15d7
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 21:07:45 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 21:09:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91563536
7
8 dev-python/twisted: Bump to 21.2.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-21.2.0.ebuild | 167 +++++++++++++++++++++++++++++++
14 2 files changed, 168 insertions(+)
15
16 diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
17 index 0272c5077b2..2c0ee46f9bf 100644
18 --- a/dev-python/twisted/Manifest
19 +++ b/dev-python/twisted/Manifest
20 @@ -1,3 +1,4 @@
21 DIST Twisted-19.10.0.tar.bz2 3118485 BLAKE2B a0d532b67177aa017e463bf823d7842d4f6ff694f78cd7600865718ffe861023a53ea6a922f7de232133edba26f5255074d7ef277ce8f3bdf02d556ccf4abf41 SHA512 de8d7fd0b2081cebeff68b060c8469377011648bc563a94a993d3530fb007ed42c3a54925c9a10c465ee7a3065cc9108ace12d10d358223fab13494becb9ac4b
22 DIST Twisted-20.3.0.tar.bz2 3127793 BLAKE2B 2e85fc3ec26d89e563c9e79a5d2adea81ff1745d18f0f92b8d45ae3729fbddf09998664257880372c7a4caeb5977c5cad7c863596b8c27ad7890275cead9f763 SHA512 1b850e5fc21a3630ead4c2cc3622c16e78bb3be38ab11d021779b7ce3d3c30acc4e19d79c7791a5fce6c5c6e09c2baa349901dffe952de67dd98eec419846365
23 +DIST twisted-21.2.0.tar.gz 3882978 BLAKE2B ba37572b0f9eadf2962a2730e4c2c0ed65f582b11b3350034660a2c53c5cd0892b19867d19e0201d4808c09fca621dbe540d153dc6c7d5827d45d2423d19d28b SHA512 fa743dcf22f3c17dfd17f39b7df0cc31fb8ce3e989478ada9a026424ec2de35e6a403ef35acdef5905eed008d42e3c2fee6b7ccdda433e6c250f1feaa83ea8a4
24 DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
25
26 diff --git a/dev-python/twisted/twisted-21.2.0.ebuild b/dev-python/twisted/twisted-21.2.0.ebuild
27 new file mode 100644
28 index 00000000000..7e25407c020
29 --- /dev/null
30 +++ b/dev-python/twisted/twisted-21.2.0.ebuild
31 @@ -0,0 +1,167 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +DISTUTILS_USE_SETUPTOOLS=rdepend
38 +PYTHON_COMPAT=( python3_{7..9} )
39 +PYTHON_REQ_USE="threads(+)"
40 +
41 +inherit distutils-r1 virtualx
42 +
43 +DESCRIPTION="An asynchronous networking framework written in Python"
44 +HOMEPAGE="https://www.twistedmatrix.com/trac/"
45 +SRC_URI="
46 + https://github.com/twisted/twisted/archive/${P}.tar.gz
47 + https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz"
48 +
49 +LICENSE="MIT"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="conch crypt http2 serial test"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="
56 + >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}]
57 + >=dev-python/automat-0.3.0[${PYTHON_USEDEP}]
58 + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
59 + >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}]
60 + >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
61 + >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}]
62 + >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
63 + conch? (
64 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
65 + dev-python/bcrypt[${PYTHON_USEDEP}]
66 + >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}]
67 + dev-python/pyasn1[${PYTHON_USEDEP}]
68 + )
69 + crypt? (
70 + >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
71 + dev-python/service_identity[${PYTHON_USEDEP}]
72 + >=dev-python/idna-0.6[${PYTHON_USEDEP}]
73 + )
74 + serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] )
75 + http2? (
76 + >=dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}]
77 + <dev-python/hyper-h2-4.0.0[${PYTHON_USEDEP}]
78 + >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
79 + <dev-python/priority-2.0[${PYTHON_USEDEP}]
80 + )
81 + !dev-python/twisted-core
82 + !dev-python/twisted-conch
83 + !dev-python/twisted-lore
84 + !dev-python/twisted-mail
85 + !dev-python/twisted-names
86 + !dev-python/twisted-news
87 + !dev-python/twisted-pair
88 + !dev-python/twisted-runner
89 + !dev-python/twisted-words
90 + !dev-python/twisted-web
91 +"
92 +BDEPEND="
93 + >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
94 + test? (
95 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
96 + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
97 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
98 + dev-python/cython-test-exception-raiser[${PYTHON_USEDEP}]
99 + dev-python/gmpy[${PYTHON_USEDEP}]
100 + dev-python/idna[${PYTHON_USEDEP}]
101 + dev-python/pyasn1[${PYTHON_USEDEP}]
102 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
103 + dev-python/pyserial[${PYTHON_USEDEP}]
104 + dev-python/service_identity[${PYTHON_USEDEP}]
105 + net-misc/openssh
106 + )
107 +"
108 +
109 +S=${WORKDIR}/${PN}-${P}
110 +
111 +python_prepare_all() {
112 + # upstream test for making releases; not very useful and requires
113 + # sphinx (including on py2)
114 + rm src/twisted/python/test/test_release.py || die
115 +
116 + # puts system in EMFILE state, then the exception handler may fail
117 + # trying to open more files due to some gi magic
118 + sed -e '/SKIP_EMFILE/s:False:True:' \
119 + -i src/twisted/internet/test/test_tcp.py || die
120 +
121 + # multicast tests fail within network-sandbox
122 + sed -e 's:test_joinLeave:_&:' \
123 + -e 's:test_loopback:_&:' \
124 + -e 's:test_multiListen:_&:' \
125 + -e 's:test_multicast:_&:' \
126 + -i src/twisted/test/test_udp.py || die
127 +
128 + # accesses /dev/net/tun
129 + sed -e '/class RealDeviceTestsMixin/a\
130 + skip = "Requires extra permissions"' \
131 + -i src/twisted/pair/test/test_tuntap.py || die
132 +
133 + # relies on the pre-CVE parse_qs() behavior in Python
134 + sed -e '/d=c;+=f/d' \
135 + -i src/twisted/web/test/test_http.py || die
136 +
137 + distutils-r1_python_prepare_all
138 +}
139 +
140 +src_test() {
141 + virtx distutils-r1_src_test
142 +}
143 +
144 +python_test() {
145 + # TODO: upstream seems to override our build paths
146 + distutils_install_for_testing
147 +
148 + "${EPYTHON}" -m twisted.trial twisted ||
149 + die "Tests failed with ${EPYTHON}"
150 +}
151 +
152 +python_install() {
153 + distutils-r1_python_install
154 +
155 + cd "${D}$(python_get_sitedir)" || die
156 +
157 + # own the dropin.cache so we don't leave orphans
158 + touch twisted/plugins/dropin.cache || die
159 +
160 + python_doscript "${WORKDIR}"/twisted-regen-cache
161 +}
162 +
163 +python_install_all() {
164 + distutils-r1_python_install_all
165 +
166 + newconfd "${FILESDIR}/twistd.conf" twistd
167 + newinitd "${FILESDIR}/twistd.init" twistd
168 +}
169 +
170 +python_postinst() {
171 + twisted-regen-cache || die
172 +}
173 +
174 +pkg_postinst() {
175 + python_foreach_impl python_postinst
176 +
177 + einfo "Install complete"
178 + if use test ; then
179 + einfo ""
180 + einfo "Some tests have been disabled during testing due to"
181 + einfo "known incompatibilities with the emerge sandboxes and/or"
182 + einfo "not runnable as the root user."
183 + einfo "For a complete test suite run on the code."
184 + einfo "Run the tests as a normal user for each python it is installed to."
185 + einfo " ie: $ python3.6 /usr/bin/trial twisted"
186 + fi
187 +}
188 +
189 +python_postrm() {
190 + rm -f "${ROOT}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die
191 +}
192 +
193 +pkg_postrm() {
194 + # if we're removing the last version, remove the cache file
195 + if [[ ! ${REPLACING_VERSIONS} ]]; then
196 + python_foreach_impl python_postrm
197 + fi
198 +}