diff options
Diffstat (limited to 'dev-python/twisted-core')
17 files changed, 1083 insertions, 0 deletions
diff --git a/dev-python/twisted-core/Manifest b/dev-python/twisted-core/Manifest new file mode 100644 index 000000000000..311de3c66a7f --- /dev/null +++ b/dev-python/twisted-core/Manifest @@ -0,0 +1,8 @@ +DIST TwistedCore-12.3.0.tar.bz2 1480622 SHA256 343dd7372b05d4aa0805406bcbee7db40514b6bb48aa2840e0e56d88a8970900 SHA512 86e9bbd4b8b0b5f70b62757f9ce93fd03c2766b4cb9722028ec7863d1b9dd19e6d3771472a86f1373a8320a98f5081ac76400ac6bb25a950b6fc50fb241ebeb8 WHIRLPOOL 77cb88bd53a5c489ad8781ebef10987766dfd42d8ad3bcd599b9ba2bbc77cf41bee8507a29727cb6d88590d8cb2ac118b1eeb553c034107513502cf7ae62f6aa +DIST TwistedCore-13.0.0.tar.bz2 1495753 SHA256 989706fd39c8a28785bdecaa0145b81f7e159b9209d463b5885be7e5c34ff32f SHA512 624d73d267742cb5b97bed2a39e78caeb01ee5fa871a0a2133455809b1d2a695f0d375c022ae21e91ef20f92fdee05a08a11db7b6b1e92ec810d3e097f929972 WHIRLPOOL 02c25eb94ad0aaafea8e1599df387607c6a1323ac55c31b0e98a366f927da2245fc839f5a3509367ed18690694f8599ebb22c0b21b8c90dfbfe2e3727a7846ff +DIST TwistedCore-13.2.0.tar.bz2 1496299 SHA256 396ee27f0e824772bf26c636c69c2751127738127e283112e72c2de6c28e36be SHA512 90cf2019f0d5b125c7bbb5a9e3e7d2dedcd8efd5f9b2ab057e0b41f899d394b995fe599128223c82b1a634fb881ad7ae8ddc5b86b26adb28a3834c05da45f2c6 WHIRLPOOL 21a90a98b36775db4e6154c30ea697ef53f4b94a30e1be125e420019d5200cbbf31178937c41b12ffb841b028875dbc6b1234cebf8036f4165d2908c431a6de4 +DIST TwistedCore-14.0.0.tar.bz2 1126188 SHA256 41fde42b917ea91c74e9ad15ae45a8104de156bcb32e7bb6a2dfa6c68141a72e SHA512 71294a10fb574d1794b730f11f89a689445ff13cf5553140dbbe049a03afe744bcc342cbff60b6d74714575bf840814fcddb0a7c94f5def1987966e0f1238704 WHIRLPOOL 1c68af280d33d0f6ce431a18f87bfa4f679aeab7f6217b388e8f7c7cb78d1b5e4587f3d3f02ccc0b7f87f6dc359c35aa15b0ee58f86385637a5d2236e7563c39 +DIST TwistedCore-14.0.1.tar.bz2 1126214 SHA256 4d80bb277bff34266fb03989d89f721ae41edfc755f4c0481813c04a759f16dc SHA512 44ef2e66636da1f7c6497cf1a4bacfdfdffd276e5b0f99b22c70f74a016de6f88a263fc549db3f04e09e86142514955bc79662760148680fb8ec823720a57a41 WHIRLPOOL ccd1acaf7f732d02b4fd45ca8285b8bbbcd3066176280b929a65879b4530f5158db8134296a35ffe565d2a8b72299ecf93329752bf5b409b60313a930cb1d876 +DIST TwistedCore-14.0.2.tar.bz2 1125732 SHA256 3d16cc6f432ecda1cc335b9a99592ee18d7eb8650e95d5f17895ab4e5e3a4ff8 SHA512 a361f5c9205eca3eda9bf222ed1894e1c55ff937e9950c0cfca193310a165486abffee529740c2c3cc0231c4ccba4d324e2ec7ef5d1aaa9516960b01e2e81ed9 WHIRLPOOL be3b1f70e616c48944741395e8c22240ea05d7f9c823b3b58ff9bebbe1d7293d0fb054b4820e19873aa1feb8d2c1e19fb84be1f632466b2c1d951900d1705d0b +DIST TwistedCore-15.1.0.tar.bz2 1139396 SHA256 c769ecc62d65a33f04f932ec727c367eb557610392e9f7bab37eaf169fb1cebf SHA512 3978429d57b7929bd65103f86d5e150950de48d27382d23a08b97be5c62c218e7cbaa06067ba6c1b926fb372cc290baf5d629af91053cf338e331d996bf8c99a WHIRLPOOL 3baa9a5986e415fee15cbdb33263a9c9ba84a4c7c79a2f744acd28881de2043b56f97137acf5b97d243fe5d6b6885eebaae2b90cced5e81ac4bef5176fd6a1f7 +DIST TwistedCore-15.2.1.tar.bz2 1179442 SHA256 42efb31330e09b5ffdb8caf735fdb925692c6cfdc03ab7ad25104c3dc41154bb SHA512 c5923d71903afac7dec15d130ff3bd247dc1a6cdeb35cc642912a43f1e5640088971ddfc7abe3e18ca1853e59ba6a417d4b465fb422aba1a052bc156d7c6e820 WHIRLPOOL 8abb2522447fd2e9ad0d3d2e3e0cac8e17e07cd80695b95f12fda6af6ccd6576f4b808f322731445667d194c2216669ad3d4d58c0bc5f798449f1d0a35bcc638 diff --git a/dev-python/twisted-core/files/twistd.conf b/dev-python/twisted-core/files/twistd.conf new file mode 100644 index 000000000000..53788cd0017e --- /dev/null +++ b/dev-python/twisted-core/files/twistd.conf @@ -0,0 +1,7 @@ + +# These are passed to twistd. +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -y /etc/twistd.tac" +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -f /etc/twistd.tap" + +# Make any additions to PYTHONPATH the twistd needs here. +# PYTHONPATH="/path/to/extra/python/modules" diff --git a/dev-python/twisted-core/files/twistd.init b/dev-python/twisted-core/files/twistd.init new file mode 100644 index 000000000000..e7b29f1a7e96 --- /dev/null +++ b/dev-python/twisted-core/files/twistd.init @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + if [ -z "${TWISTD_OPTS}" ]; then + eerror "TWISTD_OPTS is not set!" + eerror "You need to configure twistd in /etc/conf.d/twistd." + return 1 + fi + export PYTHONPATH + ebegin "Starting twistd" + start-stop-daemon --start --quiet --pidfile /var/run/twistd.pid \ + --exec /usr/bin/twistd -- --pidfile /var/run/twistd.pid \ + ${TWISTD_OPTS} + eend $? "Failed to start twistd" +} + +stop() { + ebegin "Stopping twistd" + start-stop-daemon --stop --quiet --pidfile /var/run/twistd.pid + eend $? "Failed to stop twistd" +} diff --git a/dev-python/twisted-core/files/twisted-core-12.0.0-fix-test-timeFormatting.patch b/dev-python/twisted-core/files/twisted-core-12.0.0-fix-test-timeFormatting.patch new file mode 100644 index 000000000000..a466a973f959 --- /dev/null +++ b/dev-python/twisted-core/files/twisted-core-12.0.0-fix-test-timeFormatting.patch @@ -0,0 +1,26 @@ +Apply patch: use calendar.timegm instead of manual broken timezone math. + +Author: marienz +Review: itamar +Fixes: #5583 + +Index: /trunk/twisted/test/test_log.py +=================================================================== +--- /trunk/twisted/test/test_log.py (revision 32453) ++++ /trunk/twisted/test/test_log.py (revision 34145) +@@ -6,5 +6,5 @@ + """ + +-import os, sys, time, logging, warnings ++import os, sys, time, logging, warnings, calendar + from cStringIO import StringIO + +@@ -392,7 +392,5 @@ + human-readable string. + """ +- # There is no function in the time module which converts a UTC time +- # tuple to a timestamp. +- when = time.mktime((2001, 2, 3, 4, 5, 6, 7, 8, 0)) - time.timezone ++ when = calendar.timegm((2001, 2, 3, 4, 5, 6, 7, 8, 0)) + + # Pretend to be in US/Eastern for a moment diff --git a/dev-python/twisted-core/files/twisted-core-12.1.0-remove-tests-conch-dependency.patch b/dev-python/twisted-core/files/twisted-core-12.1.0-remove-tests-conch-dependency.patch new file mode 100644 index 000000000000..db2e2454bbc6 --- /dev/null +++ b/dev-python/twisted-core/files/twisted-core-12.1.0-remove-tests-conch-dependency.patch @@ -0,0 +1,15 @@ +Index: twisted/test/test_strcred.py +=================================================================== +--- twisted/test/test_strcred.py (revision 34525) ++++ twisted/test/test_strcred.py (working copy) +@@ -352,6 +352,10 @@ + except ImportError: + skip = "PyCrypto is not available" + ++ try: ++ from twisted import conch ++ except ImportError: ++ skip = "Twisted Conch is not available" + + def test_isChecker(self): + """ diff --git a/dev-python/twisted-core/files/twisted-core-2.1.0-echo-less.patch b/dev-python/twisted-core/files/twisted-core-2.1.0-echo-less.patch new file mode 100644 index 000000000000..c180a111021d --- /dev/null +++ b/dev-python/twisted-core/files/twisted-core-2.1.0-echo-less.patch @@ -0,0 +1,13 @@ +=== modified file 'twisted/test/test_process.py' +--- twisted/test/test_process.py ++++ twisted/test/test_process.py +@@ -76,7 +76,7 @@ + + class EchoProtocol(protocol.ProcessProtocol): + +- s = "1234567" * 1001 ++ s = "1234567" * 11 + n = 10 + finished = 0 + + diff --git a/dev-python/twisted-core/files/twisted-core-2.1.0-zsh-head.patch b/dev-python/twisted-core/files/twisted-core-2.1.0-zsh-head.patch new file mode 100644 index 000000000000..236610ad9940 --- /dev/null +++ b/dev-python/twisted-core/files/twisted-core-2.1.0-zsh-head.patch @@ -0,0 +1,13 @@ +Index: twisted/python/_twisted_zsh_stub +=================================================================== +--- twisted/python/_twisted_zsh_stub (revision 14988) ++++ twisted/python/_twisted_zsh_stub (working copy) +@@ -30,7 +30,7 @@ + + function load_twisted_completions() { + [[ -z $commands[twistd] ]] && echo 'ERROR: test command "twistd" not found in path' && return 1 +- shebang=$(head -1 $commands[twistd]) ++ shebang=$(head -n1 $commands[twistd]) + [[ $shebang != \#\!* ]] && echo 'ERROR: invalid shebang line for test script "twistd"' && return 1 + PYTHON=$shebang[3,-1] + diff --git a/dev-python/twisted-core/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch b/dev-python/twisted-core/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch new file mode 100644 index 000000000000..2fe22f1640b1 --- /dev/null +++ b/dev-python/twisted-core/files/twisted-core-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch @@ -0,0 +1,11 @@ +--- twisted/plugin.py ++++ twisted/plugin.py +@@ -174,7 +174,7 @@ + if pluginKey not in existingKeys: + del dropinDotCache[pluginKey] + needsWrite = True +- if needsWrite: ++ if needsWrite and os.environ.get("TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE") is None: + try: + dropinPath.setContent(pickle.dumps(dropinDotCache)) + except: diff --git a/dev-python/twisted-core/metadata.xml b/dev-python/twisted-core/metadata.xml new file mode 100644 index 000000000000..3215da122b77 --- /dev/null +++ b/dev-python/twisted-core/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <use> + <flag name='serial'>include serial port support</flag> + </use> + <longdescription> + Twisted is an asynchronous networking framework written in Python, + supporting TCP, UDP, multicast, SSL/TLS, serial communication and + more. It is used by most of the servers, clients and protocols that + are part of other Twisted projects. + </longdescription> +</pkgmetadata> diff --git a/dev-python/twisted-core/twisted-core-12.3.0-r1.ebuild b/dev-python/twisted-core/twisted-core-12.3.0-r1.ebuild new file mode 100644 index 000000000000..001b712bac98 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-12.3.0-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="crypt gtk serial" + +DEPEND="dev-python/zope-interface[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +RDEPEND="${DEPEND}" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + # NOTE: on pypy a couple of failures (refcounting, version-checking) is + # expected + + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + sed -e "s/test_buildAllTarballs/_&/" -i twisted/python/test/test_release.py || die "sed failed" + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py || die "sed failed" + + # tap2rpm is already skipped if rpm is not installed, but fails for me on a Gentoo box with it present. + # I currently lack the cycles to track this failure down. + rm twisted/scripts/test/test_tap2rpm.py + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-13.0.0-r3.ebuild b/dev-python/twisted-core/twisted-core-13.0.0-r3.ebuild new file mode 100644 index 000000000000..8de246fe45e1 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-13.0.0-r3.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="crypt gtk serial" + +DEPEND="dev-python/zope-interface[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +RDEPEND="${DEPEND}" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + # NOTE: on pypy a couple of failures (refcounting, version-checking) is + # expected + + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + sed -e "s/test_buildAllTarballs/_&/" -i twisted/python/test/test_release.py || die "sed failed" + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py || die "sed failed" + + # tap2rpm is already skipped if rpm is not installed, but fails for me on a Gentoo box with it present. + # I currently lack the cycles to track this failure down. + rm twisted/scripts/test/test_tap2rpm.py + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-13.2.0.ebuild b/dev-python/twisted-core/twisted-core-13.2.0.ebuild new file mode 100644 index 000000000000..d1e11c4330db --- /dev/null +++ b/dev-python/twisted-core/twisted-core-13.2.0.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="crypt gtk serial" + +DEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +RDEPEND="${DEPEND}" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + # NOTE: on pypy a couple of failures (refcounting, version-checking) is + # expected + + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # tap2rpm is already skipped if rpm is not installed, but fails for me on a Gentoo box with it present. + # I currently lack the cycles to track this failure down. + rm twisted/scripts/test/test_tap2rpm.py + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 + sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die + sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web creating a cric. dep + rm -f twisted/python/test/test_release.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-14.0.0.ebuild b/dev-python/twisted-core/twisted-core-14.0.0.ebuild new file mode 100644 index 000000000000..6a020c22489a --- /dev/null +++ b/dev-python/twisted-core/twisted-core-14.0.0.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~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" +IUSE="crypt gtk serial test" + +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +DEPEND="test? ( ${RDEPEND} )" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + # NOTE: on pypy a couple of failures (refcounting, version-checking) is expected + + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 + sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die + sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web, twisted-lore and twisted-names, creating a circ. dep and fail even if installed. + # test_loreDeprecation and test_exist failures appeared in version 14.0.0. + rm -f twisted/python/test/test_release.py || die + sed -e 's:test_loreDeprecation:_&:' -i twisted/test/test_twisted.py || die + sed -e 's:test_exist:_&:' -i twisted/python/test/test_dist3.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + # Appeared in version 14.0.0; https://twistedmatrix.com/trac/ticket/7422 + sed -e 's:test_dataReceivedThrows:_&:' \ + -e 's:test_resumeProducingThrows:_&:' \ + -e 's:test_resumeProducingAbortLater:_&:' \ + -e 's:test_resumeProducingAbort:_&:' \ + -e 's:test_fullWriteBufferAfterByteExchange:_&:' \ + -i twisted/internet/test/test_tcp.py || die + sed -e 's:test_logPrefix:_&:' -i twisted/internet/test/connectionmixins.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-14.0.1.ebuild b/dev-python/twisted-core/twisted-core-14.0.1.ebuild new file mode 100644 index 000000000000..becb46ff1b56 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-14.0.1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +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" +IUSE="crypt gtk serial test" + +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +DEPEND="test? ( ${RDEPEND} )" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 6921 + # Just re-exposing them to list a full list of deficits +# sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die +# sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web, twisted-lore and twisted-names, creating a circ. dep and fail even if installed. + # test_loreDeprecation and test_exist failures appeared in version 14.0.0. + # Possibly due to over taxing of the distutils_install_for_testing function + rm -f twisted/python/test/test_release.py || die + sed -e 's:test_loreDeprecation:_&:' -i twisted/test/test_twisted.py || die + sed -e 's:test_exist:_&:' -i twisted/python/test/test_dist3.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + # Appeared in version 14.0.0; https://twistedmatrix.com/trac/ticket/7422; known failures + # Upstream somewhat unreceptive + # The last of these invokes a hang or a long delay + sed -e 's:test_dataReceivedThrows:_&:' \ + -e 's:test_resumeProducingThrows:_&:' \ + -e 's:test_resumeProducingAbortLater:_&:' \ + -e 's:test_resumeProducingAbort:_&:' \ + -e 's:test_fullWriteBufferAfterByteExchange:_&:' \ + -i twisted/internet/test/test_tcp.py || die + sed -e 's:test_logPrefix:_&:' -i twisted/internet/test/connectionmixins.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-14.0.2.ebuild b/dev-python/twisted-core/twisted-core-14.0.2.ebuild new file mode 100644 index 000000000000..becb46ff1b56 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-14.0.2.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +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" +IUSE="crypt gtk serial test" + +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +DEPEND="test? ( ${RDEPEND} )" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 6921 + # Just re-exposing them to list a full list of deficits +# sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die +# sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web, twisted-lore and twisted-names, creating a circ. dep and fail even if installed. + # test_loreDeprecation and test_exist failures appeared in version 14.0.0. + # Possibly due to over taxing of the distutils_install_for_testing function + rm -f twisted/python/test/test_release.py || die + sed -e 's:test_loreDeprecation:_&:' -i twisted/test/test_twisted.py || die + sed -e 's:test_exist:_&:' -i twisted/python/test/test_dist3.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + # Appeared in version 14.0.0; https://twistedmatrix.com/trac/ticket/7422; known failures + # Upstream somewhat unreceptive + # The last of these invokes a hang or a long delay + sed -e 's:test_dataReceivedThrows:_&:' \ + -e 's:test_resumeProducingThrows:_&:' \ + -e 's:test_resumeProducingAbortLater:_&:' \ + -e 's:test_resumeProducingAbort:_&:' \ + -e 's:test_fullWriteBufferAfterByteExchange:_&:' \ + -i twisted/internet/test/test_tcp.py || die + sed -e 's:test_logPrefix:_&:' -i twisted/internet/test/connectionmixins.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-15.1.0.ebuild b/dev-python/twisted-core/twisted-core-15.1.0.ebuild new file mode 100644 index 000000000000..becb46ff1b56 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-15.1.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +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" +IUSE="crypt gtk serial test" + +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +DEPEND="test? ( ${RDEPEND} )" + +PATCHES=( + # Give a load-sensitive test a better chance of succeeding. + "${FILESDIR}/${PN}-2.1.0-echo-less.patch" + + # Skip a test if twisted conch is not available + # (see Twisted ticket #5703) + "${FILESDIR}/${PN}-12.1.0-remove-tests-conch-dependency.patch" + + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 6921 + # Just re-exposing them to list a full list of deficits +# sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die +# sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web, twisted-lore and twisted-names, creating a circ. dep and fail even if installed. + # test_loreDeprecation and test_exist failures appeared in version 14.0.0. + # Possibly due to over taxing of the distutils_install_for_testing function + rm -f twisted/python/test/test_release.py || die + sed -e 's:test_loreDeprecation:_&:' -i twisted/test/test_twisted.py || die + sed -e 's:test_exist:_&:' -i twisted/python/test/test_dist3.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + # Appeared in version 14.0.0; https://twistedmatrix.com/trac/ticket/7422; known failures + # Upstream somewhat unreceptive + # The last of these invokes a hang or a long delay + sed -e 's:test_dataReceivedThrows:_&:' \ + -e 's:test_resumeProducingThrows:_&:' \ + -e 's:test_resumeProducingAbortLater:_&:' \ + -e 's:test_resumeProducingAbort:_&:' \ + -e 's:test_fullWriteBufferAfterByteExchange:_&:' \ + -i twisted/internet/test/test_tcp.py || die + sed -e 's:test_logPrefix:_&:' -i twisted/internet/test/connectionmixins.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} diff --git a/dev-python/twisted-core/twisted-core-15.2.1.ebuild b/dev-python/twisted-core/twisted-core-15.2.1.ebuild new file mode 100644 index 000000000000..a4424d9c22c0 --- /dev/null +++ b/dev-python/twisted-core/twisted-core-15.2.1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic twisted-r1 + +DESCRIPTION="An asynchronous networking framework written in Python" + +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" +IUSE="crypt gtk serial test" + +RDEPEND=">=dev-python/zope-interface-3.6.0[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] ) + gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] ) + serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )" +DEPEND="test? ( ${RDEPEND} )" + +PATCHES=( + # Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable. + "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" +) + +python_prepare_all() { + if [[ "${EUID}" -eq 0 ]]; then + # Disable tests failing with root permissions. + sed \ + -e "s/test_newPluginsOnReadOnlyPath/_&/" \ + -e "s/test_deployedMode/_&/" \ + -i twisted/test/test_plugin.py + fi + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + # Needed to make the sendmsg extension work + # (see http://twistedmatrix.com/trac/ticket/5701 ) + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" + fi + + distutils-r1_python_compile +} + +python_test() { + distutils_install_for_testing + + pushd "${TEST_DIR}"/lib > /dev/null || die + + # Skip broken tests. + + # http://twistedmatrix.com/trac/ticket/5375 + sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py \ + || die "sed failed" + + # Prevent it from pulling in plugins from already installed twisted packages. + rm -f twisted/plugins/__init__.py + + # An empty file doesn't work because the tests check for doc strings in all packages. + echo "'''plugins stub'''" > twisted/plugins/__init__.py || die + + # https://twistedmatrix.com/trac/ticket/6920 6921 + # Just re-exposing them to list a full list of deficits +# sed -e 's:test_basicOperation:_&:' -i twisted/scripts/test/test_tap2deb.py || die +# sed -e 's:test_inspectCertificate:_&:' -i twisted/test/test_sslverify.py || die + + # Requires twisted-web, twisted-lore and twisted-names, creating a circ. dep and fail even if installed. + # test_loreDeprecation and test_exist failures appeared in version 14.0.0. + # Possibly due to over taxing of the distutils_install_for_testing function + rm -f twisted/python/test/test_release.py || die + sed -e 's:test_loreDeprecation:_&:' -i twisted/test/test_twisted.py || die + sed -e 's:test_exist:_&:' -i twisted/python/test/test_dist3.py || die + + # Requires connection to the network + sed -e 's:test_multiListen:_&:' -i twisted/test/test_udp.py || die + + # Appeared in version 14.0.0; https://twistedmatrix.com/trac/ticket/7422; known failures + # Upstream somewhat unreceptive + # The last of these invokes a hang or a long delay + sed -e 's:test_dataReceivedThrows:_&:' \ + -e 's:test_resumeProducingThrows:_&:' \ + -e 's:test_resumeProducingAbortLater:_&:' \ + -e 's:test_resumeProducingAbort:_&:' \ + -e 's:test_fullWriteBufferAfterByteExchange:_&:' \ + -i twisted/internet/test/test_tcp.py || die + sed -e 's:test_logPrefix:_&:' -i twisted/internet/test/connectionmixins.py || die + + if ! "${TEST_DIR}"/scripts/trial twisted; then + die "Tests failed with ${EPYTHON}" + fi + + popd > /dev/null || die +} + +python_install() { + distutils-r1_python_install + + cd "${D%/}$(python_get_sitedir)" || die + + # create 'Twisted' egg wrt bug #299736 + local egg=( Twisted_Core*.egg-info ) + [[ -f ${egg[0]} ]] || die "Twisted_Core*.egg-info not found" + ln -s "${egg[0]}" "${egg[0]/_Core/}" || die + + # own the dropin.cache so we don't leave orphans + touch twisted/plugins/dropin.cache || die +} + +python_install_all() { + distutils-r1_python_install_all + + newconfd "${FILESDIR}/twistd.conf" twistd + newinitd "${FILESDIR}/twistd.init" twistd +} |