Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twisted/
Date: Thu, 28 Nov 2019 03:17:02
Message-Id: 1574910994.538d1343448d7d69ebc75afe857c6601eaa844fa.bman@gentoo
1 commit: 538d1343448d7d69ebc75afe857c6601eaa844fa
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 28 03:01:49 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 28 03:16:34 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=538d1343
7
8 dev-python/twisted: bump to 19.10.0
9
10 * Remove net-misc/openssh version constraint
11 * dev-python/bcrypt is now in DEPEND
12 * Drop all patches which are no longer required
13 * Clean python_test() per previous comment
14
15 Package is still not compatible with py3.8 but is very close. We should see full
16 support soon. Most tests pass with py3.8. Additionally, dev-python/automat will
17 require a bump to >=0.8.0 in order to support py3.8 within twisted.
18
19 Bug: https://bugs.gentoo.org/661258
20 Bug: https://bugs.gentoo.org/662340
21 Bug: https://bugs.gentoo.org/677226
22 Bug: https://bugs.gentoo.org/690790
23 Bug: https://bugs.gentoo.org/683910
24
25 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
26
27 dev-python/twisted/Manifest | 1 +
28 dev-python/twisted/twisted-19.10.0.ebuild | 173 ++++++++++++++++++++++++++++++
29 2 files changed, 174 insertions(+)
30
31 diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
32 index 7a2a32c890b..a0c39e3cb29 100644
33 --- a/dev-python/twisted/Manifest
34 +++ b/dev-python/twisted/Manifest
35 @@ -3,4 +3,5 @@ DIST Twisted-17.1.0.tar.bz2 2997334 BLAKE2B 54bd9813fb265f3561be7bc42a3ca6fc36aa
36 DIST Twisted-17.9.0.tar.bz2 3019243 BLAKE2B a79fade6c84a99303df803ad80f02c63562e7064d5b79db39c08bd0ac9a62d61f1388932b36348aa106aa409a51b2d49dc0eb5b1007ce10f196a34c2f963b8e5 SHA512 0fb854db1044bfdb208594a379a0f8df0193326a9974e193266e82113488d49220648d4a50b323fa144654e94976f5848e1d60efed13ab2668b02cc795720345
37 DIST Twisted-18.4.0.tar.bz2 3037019 BLAKE2B 6fc32f7591493ccc4fe03233307b566899b82cd035ba3329b3faaf950339a6653de697ba3873b37b22f9d7f8a66109694b80496917bf61e79c56eeb7e351ac87 SHA512 3733a6df0196ea580187da3576f5fd08f287437528a4e19813056d019cca213c61b62d879d80a12eef38661d3505ba33aac9a4fc956b19afa6da7d37a6465c83
38 DIST Twisted-18.7.0.tar.bz2 3063847 BLAKE2B a71e7f0f2888eab2849b90405350194091731730e8507172744212b9af73ba440a0c21d5c5a45ae987752c813c07c4dbb06e0e27a8c8e436d7ea6f7c3026137e SHA512 feefa578bc1787648df07e4a53bd6fe29b43c4357472e4fba37526f075be9263e8c671b6781ce6ad3569c1b1666cb702efbee903f597714a749971695018f826
39 +DIST Twisted-19.10.0.tar.bz2 3118485 BLAKE2B a0d532b67177aa017e463bf823d7842d4f6ff694f78cd7600865718ffe861023a53ea6a922f7de232133edba26f5255074d7ef277ce8f3bdf02d556ccf4abf41 SHA512 de8d7fd0b2081cebeff68b060c8469377011648bc563a94a993d3530fb007ed42c3a54925c9a10c465ee7a3065cc9108ace12d10d358223fab13494becb9ac4b
40 DIST twisted-regen-cache.gz 911 BLAKE2B ffd3fcda6c67ffe6fd3ef581c8d507548396b66ed0708e9a5c790095e579c0d5f0f71596acf05712989da2ddef2b8d437eca973bc4d80ef8a9fa852915f38305 SHA512 95a9b931c73017d16d1b5e6b41345dddffe62b6af1a8e93b5e40d06d3d15be17b0dd0181c767ffeeb791534d463764ef9e066fa6c2ee2ac4b53c86d1da8fce03
41
42 diff --git a/dev-python/twisted/twisted-19.10.0.ebuild b/dev-python/twisted/twisted-19.10.0.ebuild
43 new file mode 100644
44 index 00000000000..8c062cefae3
45 --- /dev/null
46 +++ b/dev-python/twisted/twisted-19.10.0.ebuild
47 @@ -0,0 +1,173 @@
48 +# Copyright 1999-2019 Gentoo Authors
49 +# Distributed under the terms of the GNU General Public License v2
50 +
51 +EAPI=7
52 +
53 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
54 +PYTHON_REQ_USE="threads(+)"
55 +
56 +inherit distutils-r1
57 +
58 +TWISTED_PN="Twisted"
59 +TWISTED_P="${TWISTED_PN}-${PV}"
60 +TWISTED_RELEASE=$(ver_cut 1-2)
61 +
62 +DESCRIPTION="An asynchronous networking framework written in Python"
63 +HOMEPAGE="https://www.twistedmatrix.com/trac/"
64 +SRC_URI="https://twistedmatrix.com/Releases/${TWISTED_PN}"
65 +SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2
66 + https://dev.gentoo.org/~mgorny/dist/twisted-regen-cache.gz"
67 +
68 +KEYWORDS="~amd64 ~arm ~mips ~s390 ~sh ~amd64-linux ~x86-linux"
69 +
70 +LICENSE="MIT"
71 +SLOT="0"
72 +IUSE="conch crypt http2 serial +soap test"
73 +RESTRICT="!test? ( test )"
74 +
75 +RDEPEND="
76 + >=dev-python/attrs-17.4.0[${PYTHON_USEDEP}]
77 + >=dev-python/automat-0.3.0[${PYTHON_USEDEP}]
78 + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
79 + >=dev-python/hyperlink-17.1.1[${PYTHON_USEDEP}]
80 + >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
81 + >=dev-python/pyhamcrest-1.9.0[${PYTHON_USEDEP}]
82 + >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
83 + conch? (
84 + dev-python/pyasn1[${PYTHON_USEDEP}]
85 + >=dev-python/cryptography-1.5.0[${PYTHON_USEDEP}]
86 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
87 + )
88 + crypt? (
89 + >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
90 + dev-python/service_identity[${PYTHON_USEDEP}]
91 + >=dev-python/idna-0.6[${PYTHON_USEDEP}]
92 + )
93 + serial? ( >=dev-python/pyserial-3.0[${PYTHON_USEDEP}] )
94 + soap? ( $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7) )
95 + http2? (
96 + >=dev-python/hyper-h2-3.0.0[${PYTHON_USEDEP}]
97 + <dev-python/hyper-h2-4.0.0[${PYTHON_USEDEP}]
98 + >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
99 + <dev-python/priority-2.0[${PYTHON_USEDEP}]
100 + )
101 + !dev-python/twisted-core
102 + !dev-python/twisted-conch
103 + !dev-python/twisted-lore
104 + !dev-python/twisted-mail
105 + !dev-python/twisted-names
106 + !dev-python/twisted-news
107 + !dev-python/twisted-pair
108 + !dev-python/twisted-runner
109 + !dev-python/twisted-words
110 + !dev-python/twisted-web
111 +"
112 +DEPEND="
113 + dev-python/bcrypt
114 + >=dev-python/incremental-16.10.1[${PYTHON_USEDEP}]
115 + test? (
116 + dev-python/gmpy[${PYTHON_USEDEP}]
117 + dev-python/pyasn1[${PYTHON_USEDEP}]
118 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
119 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
120 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
121 + dev-python/service_identity[${PYTHON_USEDEP}]
122 + dev-python/idna[${PYTHON_USEDEP}]
123 + dev-python/pyserial[${PYTHON_USEDEP}]
124 + >=dev-python/constantly-15.1.0[${PYTHON_USEDEP}]
125 + net-misc/openssh
126 + )
127 +"
128 +
129 +S=${WORKDIR}/${TWISTED_P}
130 +
131 +python_prepare_all() {
132 + # No allowed tests are garaunteed to work on py3.5 or py3.8
133 + if use test ; then
134 + # Remove since this is an upstream distribution test for making releases
135 + rm src/twisted/python/test/test_release.py || die "rm src/twisted/python/test/test_release.py FAILED"
136 +
137 + # Remove these as they are known to fail -- fix (py2.7 - py3.6)
138 + rm src/twisted/conch/test/test_ckeygen.py || die "rm src/twisted/conch/test/test_ckeygen.py FAILED"
139 + rm src/twisted/pair/test/test_tuntap.py || die "rm src/twisted/pair/test/test_tuntap.py FAILED"
140 + rm src/twisted/test/test_log.py || die "rm src/twisted/test/test_log.py FAILED"
141 +
142 + # This test fails only on py3.7
143 + rm src/twisted/internet/test/test_process.py || die " rm src/twisted/internet/test/test_process.py FAILED"
144 + fi
145 + distutils-r1_python_prepare_all
146 +}
147 +
148 +python_test() {
149 + distutils_install_for_testing
150 +
151 + # workaround for the eclass not installing the entry points
152 + # in the test environment. copy the old 16.3.2 start script
153 + # to run the tests with
154 + cp "${FILESDIR}"/trial "${TEST_DIR}" || die
155 + chmod +x "${TEST_DIR}"/trial || die
156 +
157 + pushd "${TEST_DIR}" > /dev/null || die
158 +
159 + if ! "${TEST_DIR}"/trial twisted; then
160 + die "Tests failed with ${EPYTHON}"
161 + fi
162 +
163 + if ! "${TEST_DIR}"/trial twisted.test.test_twistd.DaemonizeTests; then
164 + die "DaemonizeTests failed with ${EPYTHON}"
165 + fi
166 +
167 + if ! "${TEST_DIR}"/trial twisted.test.test_reflect.SafeStrTests; then
168 + die "SafeStrTests failed with ${EPYTHON}"
169 + fi
170 +
171 + popd > /dev/null || die
172 +}
173 +
174 +python_install() {
175 + distutils-r1_python_install
176 +
177 + cd "${D%}$(python_get_sitedir)" || die
178 +
179 + # own the dropin.cache so we don't leave orphans
180 + touch twisted/plugins/dropin.cache || die
181 +
182 + python_doscript "${WORKDIR}"/twisted-regen-cache
183 +}
184 +
185 +python_install_all() {
186 + distutils-r1_python_install_all
187 +
188 + newconfd "${FILESDIR}/twistd.conf" twistd
189 + newinitd "${FILESDIR}/twistd.init" twistd
190 +}
191 +
192 +python_postinst() {
193 + twisted-regen-cache || die
194 +}
195 +
196 +pkg_postinst() {
197 + python_foreach_impl python_postinst
198 +
199 + einfo "Install complete"
200 + if use test ; then
201 + einfo ""
202 + einfo "Some tests have been disabled during testing due to"
203 + einfo "known incompatibilities with the emerge sandboxes and/or"
204 + einfo "not runnable as the root user."
205 + einfo "For a complete test suite run on the code."
206 + einfo "Run the tests as a normal user for each python it is installed to."
207 + einfo " ie: $ python3.6 /usr/bin/trial twisted"
208 + fi
209 +}
210 +
211 +python_postrm() {
212 + rm -f "${ROOT%}$(python_get_sitedir)/twisted/plugins/dropin.cache" || die
213 +}
214 +
215 +pkg_postrm(){
216 + # if we're removing the last version, remove the cache file
217 + if [[ ! ${REPLACING_VERSIONS} ]]; then
218 + python_foreach_impl python_postrm
219 + fi
220 +}