Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twisted/, dev-python/twisted/files/
Date: Fri, 07 Oct 2016 18:11:36
Message-Id: 1475863872.7b38d796995f1976adaee32425c058d2bdfcb312.dolsen@gentoo
1 commit: 7b38d796995f1976adaee32425c058d2bdfcb312
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 5 23:07:02 2016 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 7 18:11:12 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b38d796
7
8 dev-python/twisted: New monolithic release twisted package
9
10 Twisted has changed to a single release pkg.
11 This new pkg. now has python3 support.
12
13 Package-Manager: portage-2.3.1_p8
14
15 dev-python/twisted/Manifest | 2 +
16 dev-python/twisted/files/twistd.conf | 7 ++
17 dev-python/twisted/files/twistd.init | 25 ++++
18 ...t_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch | 11 ++
19 dev-python/twisted/metadata.xml | 36 ++++++
20 dev-python/twisted/twisted-16.2.0.ebuild | 126 +++++++++++++++++++
21 dev-python/twisted/twisted-16.3.2.ebuild | 134 +++++++++++++++++++++
22 7 files changed, 341 insertions(+)
23
24 diff --git a/dev-python/twisted/Manifest b/dev-python/twisted/Manifest
25 new file mode 100644
26 index 00000000..61d1a6e
27 --- /dev/null
28 +++ b/dev-python/twisted/Manifest
29 @@ -0,0 +1,2 @@
30 +DIST Twisted-16.2.0.tar.bz2 2942537 SHA256 a090e8dc675e97fb20c3bb5f8114ae94169f4e29fd3b3cbede35705fd3cdbd79 SHA512 a1942c15a84946e8bd4833801fffe7be01443560209972e10043262fd17a73c5d0c50592bd037130b6a1de08d7223cbdc1e2398c8c67f559d42e3e8ec81df840 WHIRLPOOL f847d57b833f7fbd9135c4a07af163afaa1e7a821d3aa657b34b2b465540bdce6472682ec20d7f8244117e99a4301e485afe6a765c07b7b64ac9bc90a9592af4
31 +DIST Twisted-16.3.2.tar.bz2 2916410 SHA256 22c32e68feb6be7ea68bcbc8f89184f06b5693a9f1b59d052927d19597645967 SHA512 6ddca880a06087717487d8a5cc128da81f1acbc97e5c372b1ba51eaeb87390ae7f91925e8e4cc90f29df21692bc11b6e0fe3772341b8488940895e57942e5149 WHIRLPOOL ad381b36f94351c15713e35d6312bae35c78ff90eb485892131f7db8c89168ccf5ddbc9d486bfeb47db695e75280bc73401194c6b36815c5859cc945d0191a7b
32
33 diff --git a/dev-python/twisted/files/twistd.conf b/dev-python/twisted/files/twistd.conf
34 new file mode 100644
35 index 00000000..53788cd
36 --- /dev/null
37 +++ b/dev-python/twisted/files/twistd.conf
38 @@ -0,0 +1,7 @@
39 +
40 +# These are passed to twistd.
41 +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -y /etc/twistd.tac"
42 +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -f /etc/twistd.tap"
43 +
44 +# Make any additions to PYTHONPATH the twistd needs here.
45 +# PYTHONPATH="/path/to/extra/python/modules"
46
47 diff --git a/dev-python/twisted/files/twistd.init b/dev-python/twisted/files/twistd.init
48 new file mode 100644
49 index 00000000..b031b00
50 --- /dev/null
51 +++ b/dev-python/twisted/files/twistd.init
52 @@ -0,0 +1,25 @@
53 +#!/sbin/openrc-run
54 +
55 +depend() {
56 + need net
57 +}
58 +
59 +start() {
60 + if [ -z "${TWISTD_OPTS}" ]; then
61 + eerror "TWISTD_OPTS is not set!"
62 + eerror "You need to configure twistd in /etc/conf.d/twistd."
63 + return 1
64 + fi
65 + export PYTHONPATH
66 + ebegin "Starting twistd"
67 + start-stop-daemon --start --quiet --pidfile /var/run/twistd.pid \
68 + --exec /usr/bin/twistd -- --pidfile /var/run/twistd.pid \
69 + ${TWISTD_OPTS}
70 + eend $? "Failed to start twistd"
71 +}
72 +
73 +stop() {
74 + ebegin "Stopping twistd"
75 + start-stop-daemon --stop --quiet --pidfile /var/run/twistd.pid
76 + eend $? "Failed to stop twistd"
77 +}
78
79 diff --git a/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch b/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
80 new file mode 100644
81 index 00000000..2fe22f1
82 --- /dev/null
83 +++ b/dev-python/twisted/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch
84 @@ -0,0 +1,11 @@
85 +--- twisted/plugin.py
86 ++++ twisted/plugin.py
87 +@@ -174,7 +174,7 @@
88 + if pluginKey not in existingKeys:
89 + del dropinDotCache[pluginKey]
90 + needsWrite = True
91 +- if needsWrite:
92 ++ if needsWrite and os.environ.get("TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE") is None:
93 + try:
94 + dropinPath.setContent(pickle.dumps(dropinDotCache))
95 + except:
96
97 diff --git a/dev-python/twisted/metadata.xml b/dev-python/twisted/metadata.xml
98 new file mode 100644
99 index 00000000..bb89489
100 --- /dev/null
101 +++ b/dev-python/twisted/metadata.xml
102 @@ -0,0 +1,36 @@
103 +<?xml version="1.0" encoding="UTF-8"?>
104 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
105 +<pkgmetadata>
106 + <maintainer type="project">
107 + <email>python@g.o</email>
108 + <name>Python</name>
109 + </maintainer>
110 + <maintainer type="person">
111 + <email>dol-sen@g.o</email>
112 + <description>maintainer</description>
113 + </maintainer>
114 + <upstream>
115 + <maintainer>
116 + <email>twisted-python@×××××××××××××.com</email>
117 + <name>Twisted Matrix Laboratories</name>
118 + </maintainer>
119 + <remote-id type="pypi">Twisted</remote-id>
120 + </upstream>
121 + <use>
122 + <flag name="conch">include Twisted SSHv2 implementation</flag>
123 + <flag name="http2">include http2 support</flag>
124 + <flag name="serial">include serial port support</flag>
125 + </use>
126 + <longdescription>Twisted is an event-based framework for internet
127 + applications, supporting Python 2.7 and Python 3.3+. It includes
128 + modules for many different purposes, including the following:
129 +
130 +twisted.web: HTTP clients and servers, HTML templating, and a WSGI server
131 +twisted.conch: SSHv2 and Telnet clients and servers and terminal emulators
132 +twisted.words: Clients and servers for IRC, XMPP, and other IM protocols
133 +twisted.mail: IMAPv4, POP3, SMTP clients and servers
134 +twisted.positioning: Tools for communicating with NMEA-compatible GPS receivers
135 +twisted.names: DNS client and tools for making your own DNS servers
136 +twisted.trial: A unit testing framework that integrates well with Twisted-based code.
137 + </longdescription>
138 +</pkgmetadata>
139
140 diff --git a/dev-python/twisted/twisted-16.2.0.ebuild b/dev-python/twisted/twisted-16.2.0.ebuild
141 new file mode 100644
142 index 00000000..7f47bfc
143 --- /dev/null
144 +++ b/dev-python/twisted/twisted-16.2.0.ebuild
145 @@ -0,0 +1,126 @@
146 +# Copyright 1999-2016 Gentoo Foundation
147 +# Distributed under the terms of the GNU General Public License v2
148 +# $Id$
149 +
150 +EAPI=5
151 +PYTHON_COMPAT=( python2_7 python3_{4,5})
152 +PYTHON_REQ_USE="threads(+)"
153 +TWISTED_PN="Twisted"
154 +
155 +inherit eutils flag-o-matic twisted-r1
156 +
157 +DESCRIPTION="An asynchronous networking framework written in Python"
158 +SRC_URI="http://twistedmatrix.com/Releases/${TWISTED_PN}"
159 +SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2"
160 +
161 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
162 +KEYWORDS="~amd64 ~x86"
163 +IUSE="conch crypt serial +soap test"
164 +
165 +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}]
166 + conch? (
167 + dev-python/gmpy[${PYTHON_USEDEP}]
168 + dev-python/pyasn1[${PYTHON_USEDEP}]
169 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
170 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
171 + )
172 + crypt? (
173 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
174 + dev-python/service_identity[${PYTHON_USEDEP}]
175 + dev-python/idna[${PYTHON_USEDEP}]
176 + )
177 + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )
178 + soap? ( $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7) )
179 +"
180 +DEPEND="
181 + !dev-python/twisted-core
182 + !dev-python/twisted-conch
183 + !dev-python/twisted-mail
184 + !dev-python/twisted-names
185 + !dev-python/twisted-words
186 + !dev-python/twisted-web
187 + test? (
188 + dev-python/gmpy[${PYTHON_USEDEP}]
189 + dev-python/pyasn1[${PYTHON_USEDEP}]
190 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
191 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
192 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
193 + dev-python/service_identity[${PYTHON_USEDEP}]
194 + dev-python/idna[${PYTHON_USEDEP}]
195 + dev-python/pyserial[${PYTHON_USEDEP}]
196 + $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7)
197 + )
198 +"
199 +
200 +PATCHES=(
201 + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
202 + "${FILESDIR}/${PN}-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch"
203 +)
204 +
205 +python_prepare_all() {
206 + # Remove some tests known to fail due to the network sandbox
207 + rm -R twisted/pair/test/test_*.py || die "rm twisted/pair/test/test_*.py FAILED"
208 + # Possibly due to over taxing of the distutils_install_for_testing function
209 + rm twisted/python/test/test_release.py || die "rm twisted/python/test/test_release.py FAILED"
210 + if [[ "${EUID}" -eq 0 ]]; then
211 + # Disable tests failing with root permissions.
212 + sed \
213 + -e "s/test_newPluginsOnReadOnlyPath/_&/" \
214 + -e "s/test_deployedMode/_&/" \
215 + -i twisted/test/test_plugin.py
216 + fi
217 +
218 + distutils-r1_python_prepare_all
219 +}
220 +
221 +python_compile() {
222 + if ! python_is_python3; then
223 + # Needed to make the sendmsg extension work
224 + # (see http://twistedmatrix.com/trac/ticket/5701 )
225 + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
226 + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
227 + fi
228 +
229 + distutils-r1_python_compile
230 +}
231 +
232 +python_test() {
233 + distutils_install_for_testing
234 +
235 + pushd "${TEST_DIR}"/lib > /dev/null || die
236 +
237 + if ! "${TEST_DIR}"/scripts/trial twisted; then
238 + die "Tests failed with ${EPYTHON}"
239 + fi
240 +
241 + popd > /dev/null || die
242 +}
243 +
244 +python_install() {
245 + distutils-r1_python_install
246 +
247 + cd "${D%/}$(python_get_sitedir)" || die
248 +
249 + # create 'Twisted' egg wrt bug #299736
250 + #local egg=( Twisted_Core*.egg-info )
251 + #[[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found"
252 + #ln -s "${egg[0]}" "${egg[0]/_Core/}" || die
253 +
254 + # own the dropin.cache so we don't leave orphans
255 + touch twisted/plugins/dropin.cache || die
256 +}
257 +
258 +python_install_all() {
259 + distutils-r1_python_install_all
260 +
261 + newconfd "${FILESDIR}/twistd.conf" twistd
262 + newinitd "${FILESDIR}/twistd.init" twistd
263 +}
264 +
265 +pkg_postinst(){
266 + einfo "Install complete"
267 +}
268 +
269 +pkg_postrm(){
270 + einfo ""
271 +}
272
273 diff --git a/dev-python/twisted/twisted-16.3.2.ebuild b/dev-python/twisted/twisted-16.3.2.ebuild
274 new file mode 100644
275 index 00000000..59abe77
276 --- /dev/null
277 +++ b/dev-python/twisted/twisted-16.3.2.ebuild
278 @@ -0,0 +1,134 @@
279 +# Copyright 1999-2016 Gentoo Foundation
280 +# Distributed under the terms of the GNU General Public License v2
281 +# $Id$
282 +
283 +EAPI=5
284 +PYTHON_COMPAT=( python2_7 python3_{4,5})
285 +PYTHON_REQ_USE="threads(+)"
286 +TWISTED_PN="Twisted"
287 +
288 +inherit eutils flag-o-matic twisted-r1
289 +
290 +DESCRIPTION="An asynchronous networking framework written in Python"
291 +SRC_URI="http://twistedmatrix.com/Releases/${TWISTED_PN}"
292 +SRC_URI="${SRC_URI}/${TWISTED_RELEASE}/${TWISTED_P}.tar.bz2"
293 +
294 +# Dropped keywords due to new deps not keyworded
295 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
296 +KEYWORDS="~amd64 ~x86"
297 +IUSE="conch crypt http2 serial +soap test"
298 +
299 +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}]
300 + conch? (
301 + dev-python/gmpy[${PYTHON_USEDEP}]
302 + dev-python/pyasn1[${PYTHON_USEDEP}]
303 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
304 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
305 + )
306 + crypt? (
307 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
308 + dev-python/service_identity[${PYTHON_USEDEP}]
309 + dev-python/idna[${PYTHON_USEDEP}]
310 + )
311 + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )
312 + soap? ( $(python_gen_cond_dep 'dev-python/soappy[${PYTHON_USEDEP}]' python2_7) )
313 + http2? (
314 + >=dev-python/hyper-h2-2.3.0[${PYTHON_USEDEP}]
315 + <dev-python/hyper-h2-3.0[${PYTHON_USEDEP}]
316 + >=dev-python/priority-1.1.0[${PYTHON_USEDEP}]
317 + <dev-python/priority-2.0[${PYTHON_USEDEP}]
318 + )
319 + !dev-python/twisted-core
320 + !dev-python/twisted-conch
321 + !dev-python/twisted-lore
322 + !dev-python/twisted-mail
323 + !dev-python/twisted-names
324 + !dev-python/twisted-news
325 + !dev-python/twisted-pair
326 + !dev-python/twisted-runner
327 + !dev-python/twisted-words
328 + !dev-python/twisted-web
329 +"
330 +DEPEND="
331 + test? (
332 + dev-python/gmpy[${PYTHON_USEDEP}]
333 + dev-python/pyasn1[${PYTHON_USEDEP}]
334 + >=dev-python/cryptography-0.9.1[${PYTHON_USEDEP}]
335 + >=dev-python/appdirs-1.4.0[${PYTHON_USEDEP}]
336 + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
337 + dev-python/service_identity[${PYTHON_USEDEP}]
338 + dev-python/idna[${PYTHON_USEDEP}]
339 + dev-python/pyserial[${PYTHON_USEDEP}]
340 + )
341 +"
342 +
343 +PATCHES=(
344 + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
345 + "${FILESDIR}/${PN}-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch"
346 +)
347 +
348 +python_prepare_all() {
349 + # Remove some tests known to fail due to the network sandbox
350 + rm -R twisted/pair/test/test_*.py || die "rm twisted/pair/test/test_*.py FAILED"
351 + # Possibly due to over taxing of the distutils_install_for_testing function
352 + rm twisted/python/test/test_release.py || die "rm twisted/python/test/test_release.py FAILED"
353 + if [[ "${EUID}" -eq 0 ]]; then
354 + # Disable tests failing with root permissions.
355 + sed \
356 + -e "s/test_newPluginsOnReadOnlyPath/_&/" \
357 + -e "s/test_deployedMode/_&/" \
358 + -i twisted/test/test_plugin.py
359 + fi
360 +
361 + distutils-r1_python_prepare_all
362 +}
363 +
364 +python_compile() {
365 + if ! python_is_python3; then
366 + # Needed to make the sendmsg extension work
367 + # (see http://twistedmatrix.com/trac/ticket/5701 )
368 + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
369 + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
370 + fi
371 +
372 + distutils-r1_python_compile
373 +}
374 +
375 +python_test() {
376 + distutils_install_for_testing
377 +
378 + pushd "${TEST_DIR}"/lib > /dev/null || die
379 +
380 + if ! "${TEST_DIR}"/scripts/trial twisted; then
381 + die "Tests failed with ${EPYTHON}"
382 + fi
383 +
384 + popd > /dev/null || die
385 +}
386 +
387 +python_install() {
388 + distutils-r1_python_install
389 +
390 + cd "${D%/}$(python_get_sitedir)" || die
391 +
392 + # create 'Twisted' egg wrt bug #299736
393 + #local egg=( Twisted_Core*.egg-info )
394 + #[[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found"
395 + #ln -s "${egg[0]}" "${egg[0]/_Core/}" || die
396 +
397 + # own the dropin.cache so we don't leave orphans
398 + touch twisted/plugins/dropin.cache || die
399 +}
400 +
401 +python_install_all() {
402 + distutils-r1_python_install_all
403 +
404 + newconfd "${FILESDIR}/twistd.conf" twistd
405 + newinitd "${FILESDIR}/twistd.init" twistd
406 +}
407 +
408 +pkg_postrm(){
409 + # pre portage-2.3.2 release workaround for bug 595028
410 + cd "${HOME}"
411 + _distutils-r1_run_foreach_impl twisted-r1_update_plugin_cache
412 +}