summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-28 17:34:54 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-28 17:34:54 +0000
commit86d7d6fe6f6283b412f17005e8424e5eb080a66e (patch)
treec37f25222c4d5b38dfaf0cd58b7e7b4bea0c64ac /dev-python/twisted
parentModify pygobject-codegen-2.0 to support multiple Python versions instead of r... (diff)
downloadgentoo-2-86d7d6fe6f6283b412f17005e8424e5eb080a66e.tar.gz
gentoo-2-86d7d6fe6f6283b412f17005e8424e5eb080a66e.tar.bz2
gentoo-2-86d7d6fe6f6283b412f17005e8424e5eb080a66e.zip
Set SUPPORT_PYTHON_ABIS. Disable broken tests (bug #181470 and bug #190433). Remove broken patch (bug #268737).
(Portage version: 14166-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/twisted')
-rw-r--r--dev-python/twisted/ChangeLog12
-rw-r--r--dev-python/twisted/files/twisted-8.2.0_deprecations.patch26
-rw-r--r--dev-python/twisted/files/twisted-8.2.0_tests.patch51
-rw-r--r--dev-python/twisted/twisted-8.2.0-r2.ebuild (renamed from dev-python/twisted/twisted-8.2.0-r1.ebuild)87
4 files changed, 96 insertions, 80 deletions
diff --git a/dev-python/twisted/ChangeLog b/dev-python/twisted/ChangeLog
index eb75313c0b5c..832cd469d650 100644
--- a/dev-python/twisted/ChangeLog
+++ b/dev-python/twisted/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/twisted
-# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/ChangeLog,v 1.104 2009/07/16 06:05:54 neurogeek Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/ChangeLog,v 1.105 2009/08/28 17:34:53 arfrever Exp $
+
+*twisted-8.2.0-r2 (28 Aug 2009)
+
+ 28 Aug 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ -twisted-8.2.0-r1.ebuild, +twisted-8.2.0-r2.ebuild,
+ -files/twisted-8.2.0_deprecations.patch, files/twisted-8.2.0_tests.patch:
+ Set SUPPORT_PYTHON_ABIS. Disable broken tests (bug #181470 and bug
+ #190433). Remove broken patch (bug #268737).
*twisted-8.2.0-r1 (16 Jul 2009)
diff --git a/dev-python/twisted/files/twisted-8.2.0_deprecations.patch b/dev-python/twisted/files/twisted-8.2.0_deprecations.patch
deleted file mode 100644
index ee2db162e94d..000000000000
--- a/dev-python/twisted/files/twisted-8.2.0_deprecations.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -uNr TwistedCore-8.2.0.orig/twisted/persisted/sob.py TwistedCore-8.2.0/twisted/persisted/sob.py
---- TwistedCore-8.2.0.orig/twisted/persisted/sob.py 2009-07-16 04:54:40.000000000 +0000
-+++ TwistedCore-8.2.0/twisted/persisted/sob.py 2009-07-16 05:31:48.000000000 +0000
-@@ -9,7 +9,9 @@
- Maintainer: Moshe Zadka
- """
-
--import os, md5, sys
-+import os, sys
-+from hashlib import md5
-+
- try:
- import cPickle as pickle
- except ImportError:
-diff -uNr TwistedCore-8.2.0.orig/twisted/python/filepath.py TwistedCore-8.2.0/twisted/python/filepath.py
---- TwistedCore-8.2.0.orig/twisted/python/filepath.py 2009-07-16 04:54:40.000000000 +0000
-+++ TwistedCore-8.2.0/twisted/python/filepath.py 2009-07-16 05:31:22.000000000 +0000
-@@ -9,7 +9,7 @@
- import os
- import errno
- import random
--import sha
-+from hashlib import sha1
- import base64
-
- from os.path import isabs, exists, normpath, abspath, splitext
diff --git a/dev-python/twisted/files/twisted-8.2.0_tests.patch b/dev-python/twisted/files/twisted-8.2.0_tests.patch
index daf4e52eeb16..c254de4bf25c 100644
--- a/dev-python/twisted/files/twisted-8.2.0_tests.patch
+++ b/dev-python/twisted/files/twisted-8.2.0_tests.patch
@@ -1,15 +1,13 @@
-diff -uNr TwistedCore-8.2.0.orig/twisted/python/test/test_release.py TwistedCore-8.2.0/twisted/python/test/test_release.py
---- TwistedCore-8.2.0.orig/twisted/python/test/test_release.py 2009-07-16 04:54:40.000000000 +0000
-+++ TwistedCore-8.2.0/twisted/python/test/test_release.py 2009-07-16 04:55:00.000000000 +0000
+--- twisted/python/test/test_release.py
++++ twisted/python/test/test_release.py
@@ -1919,4 +1919,4 @@
BookBuilderTests.skip = skipMessage
DocBuilderTestCase.skip = skipMessage
ManBuilderTestCase.skip = skipMessage
- DistributionBuilderTests.skip = skipMessage
+ DistributionBuilderTest.skip = skipMessage
-diff -uNr TwistedCore-8.2.0.orig/twisted/python/test/test_util.py TwistedCore-8.2.0/twisted/python/test/test_util.py
---- TwistedCore-8.2.0.orig/twisted/python/test/test_util.py 2009-07-16 04:54:40.000000000 +0000
-+++ TwistedCore-8.2.0/twisted/python/test/test_util.py 2009-07-16 05:19:15.000000000 +0000
+--- twisted/python/test/test_util.py
++++ twisted/python/test/test_util.py
@@ -18,7 +18,7 @@
from twisted.internet.defer import Deferred
from twisted.internet.error import ProcessDone
@@ -247,3 +245,44 @@ diff -uNr TwistedCore-8.2.0.orig/twisted/python/test/test_util.py TwistedCore-8.
+# self._testUIDGIDSwitch(1, 1, 2, 1, [0, 2, 0, 1], [])
+# self._testUIDGIDSwitch(1, 1, 1, 2, [0, 1, 0, 1], [2, 1])
+# self._testUIDGIDSwitch(1, 1, 2, 2, [0, 2, 0, 1], [2, 1])
+--- twisted/trial/test/test_util.py
++++ twisted/trial/test/test_util.py
+@@ -209,22 +209,22 @@
+ return d.addCallback(check)
+
+
+- def test_stripFlags(self):
+- """
+- If the C{stripFlags} option is passed to C{runSequentially} then the
+- SUCCESS / FAILURE flags are stripped from the output. Instead, the
+- Deferred fires a flat list of results containing only the results and
+- failures.
+- """
+- d = util._runSequentially([lambda: self.fail('foo'), lambda: 'bar'],
+- stripFlags=True)
+- def check(results):
+- [fail, result] = results
+- fail.trap(self.failureException)
+- self.assertEqual(fail.getErrorMessage(), 'foo')
+- self.assertEqual(result, 'bar')
+- return d.addCallback(check)
+- test_stripFlags.todo = "YAGNI"
++# def test_stripFlags(self):
++# """
++# If the C{stripFlags} option is passed to C{runSequentially} then the
++# SUCCESS / FAILURE flags are stripped from the output. Instead, the
++# Deferred fires a flat list of results containing only the results and
++# failures.
++# """
++# d = util._runSequentially([lambda: self.fail('foo'), lambda: 'bar'],
++# stripFlags=True)
++# def check(results):
++# [fail, result] = results
++# fail.trap(self.failureException)
++# self.assertEqual(fail.getErrorMessage(), 'foo')
++# self.assertEqual(result, 'bar')
++# return d.addCallback(check)
++# test_stripFlags.todo = "YAGNI"
+
+
+
diff --git a/dev-python/twisted/twisted-8.2.0-r1.ebuild b/dev-python/twisted/twisted-8.2.0-r2.ebuild
index 221fe9086287..296f82a14bc9 100644
--- a/dev-python/twisted/twisted-8.2.0-r1.ebuild
+++ b/dev-python/twisted/twisted-8.2.0-r2.ebuild
@@ -1,11 +1,13 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/twisted-8.2.0-r1.ebuild,v 1.1 2009/07/16 06:05:54 neurogeek Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/twisted-8.2.0-r2.ebuild,v 1.1 2009/08/28 17:34:53 arfrever Exp $
EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+
inherit distutils versionator
-MY_P=TwistedCore-${PV}
+MY_P="TwistedCore-${PV}"
DESCRIPTION="An asynchronous networking framework written in Python"
HOMEPAGE="http://www.twistedmatrix.com/"
@@ -14,7 +16,7 @@ SRC_URI="http://tmrc.mit.edu/mirror/${PN}/Core/$(get_version_component_range 1-2
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
-IUSE="gtk serial crypt"
+IUSE="crypt gtk serial"
DEPEND=">=dev-lang/python-2.3
>=net-zope/zopeinterface-3.0.1
@@ -24,7 +26,9 @@ DEPEND=">=dev-lang/python-2.3
!dev-python/twisted-docs"
RDEPEND="${DEPEND}"
-S=${WORKDIR}/${MY_P}
+RESTRICT_PYTHON_ABIS="3*"
+
+S="${WORKDIR}/${MY_P}"
DOCS="CREDITS NEWS README"
@@ -37,14 +41,36 @@ src_prepare(){
# Skip tests that demand non-root user
epatch "${FILESDIR}/${P}_tests.patch"
+}
- # Skip test that only works with Python >=2.5 (won't byte-compile)
- if [ "${PYVER_MINOR}" -lt 5 ]; then
- echo "'''skip'''" > "twisted/test/generator_failure_tests.py" || die
- else
- #Apply deprecation Warnings patch
- epatch "${FILESDIR}/${P}_deprecations.patch"
- fi
+src_test() {
+ testing() {
+ "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${T}/tests" --no-compile || die "Installation of tests failed with Python ${PYTHON_ABI}"
+
+ pushd "${T}/tests$(python_get_sitedir)" > /dev/null || die
+
+ # Skip tests that demand non-root user.
+ rm -f twisted/test/test_plugin.py
+ rm -f twisted/test/test_process.py
+
+ # Skip broken tests.
+ rm -f twisted/python/test/test_release.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
+ # docstrings in all packages
+ echo "'''plugins stub'''" > twisted/plugins/__init__.py || die
+
+ PYTHONPATH=. "${T}/tests/usr/bin/trial" twisted || die "trial failed with Python ${PYTHON_ABI}"
+
+ popd > /dev/null || die
+ }
+ python_execute_function testing
+
+ cd "${S}"
+ rm -rf "${T}/tests"
}
src_install() {
@@ -52,15 +78,13 @@ src_install() {
# get rid of this to prevent collision-protect from killing us. it
# is regenerated in pkg_postinst.
- rm "${D}/usr/$(get_libdir)"/python*/site-packages/twisted/plugins/dropin.cache
+ rm -f "${D}/usr/$(get_libdir)"/python*/site-packages/twisted/plugins/dropin.cache
# weird pattern to avoid installing the index.xhtml page
doman doc/man/*.?
insinto /usr/share/doc/${PF}
doins -r $(find doc -mindepth 1 -maxdepth 1 -not -name man)
- # workaround for a possible portage bug
- mkdir -p "${D}/etc/conf.d/"
newconfd "${FILESDIR}/twistd.conf" twistd
newinitd "${FILESDIR}/twistd.init" twistd
@@ -70,8 +94,7 @@ src_install() {
}
update_plugin_cache() {
- python_version
- local tpath="${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/twisted"
+ local tpath="${ROOT}$(python_get_sitedir)/twisted"
# we have to remove the cache or removed plugins won't be removed
# from the cache (http://twistedmatrix.com/bugs/issue926)
[[ -e "${tpath}/plugins/dropin.cache" ]] && rm -f "${tpath}/plugins/dropin.cache"
@@ -85,38 +108,10 @@ update_plugin_cache() {
pkg_postinst() {
distutils_pkg_postinst
- update_plugin_cache
+ python_execute_function update_plugin_cache
}
pkg_postrm() {
distutils_pkg_postrm
- update_plugin_cache
-}
-
-src_test() {
- python_version
-
- if has_version ">=dev-lang/python-2.3"; then
- "${python}" setup.py install --root="${T}/tests" --no-compile || die
- else
- "${python}" setup.py install --root="${T}/tests" || die
- fi
-
- cd "${T}/tests/usr/$(get_libdir)/python${PYVER}/site-packages/" || die
-
- #Skip tests that demand non-root user
- rm -rf "twisted/test/test_plugin.py"
- rm -rf "twisted/test/test_process.py"
-
- # prevent it from pulling in plugins from already installed
- # twisted packages
- rm twisted/plugins/__init__.py || die
-
- # an empty file doesn't work because the tests check for
- # docstrings in all packages
- echo "'''plugins stub'''" > twisted/plugins/__init__.py || die
-
- PYTHONPATH=. "${T}"/tests/usr/bin/trial twisted || die "trial failed"
- cd "${S}"
- rm -rf "${T}/tests"
+ python_execute_function update_plugin_cache
}