summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2014-10-10 13:34:07 +0000
committerIan Delaney <idella4@gentoo.org>2014-10-10 13:34:07 +0000
commit002ee343cd8aa8b0c7c37fec458a88e75110f038 (patch)
tree030bcab67f1e6f74294541b040ff2761bc4c3baa /dev-python
parentCleanup old. (diff)
downloadgentoo-2-002ee343cd8aa8b0c7c37fec458a88e75110f038.tar.gz
gentoo-2-002ee343cd8aa8b0c7c37fec458a88e75110f038.tar.bz2
gentoo-2-002ee343cd8aa8b0c7c37fec458a88e75110f038.zip
add patch from upstream, re-based, improving but not fixing testsute completely
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/execnet/ChangeLog9
-rw-r--r--dev-python/execnet/execnet-1.2.0-r2.ebuild56
-rw-r--r--dev-python/execnet/files/1.2.0-tests.patch115
3 files changed, 179 insertions, 1 deletions
diff --git a/dev-python/execnet/ChangeLog b/dev-python/execnet/ChangeLog
index b6567aa58995..5174d7b6bb91 100644
--- a/dev-python/execnet/ChangeLog
+++ b/dev-python/execnet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/execnet
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/execnet/ChangeLog,v 1.20 2014/10/02 10:01:48 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/execnet/ChangeLog,v 1.21 2014/10/10 13:34:07 idella4 Exp $
+
+*execnet-1.2.0-r2 (10 Oct 2014)
+
+ 10 Oct 2014; Ian Delaney <idella4@gentoo.org> +execnet-1.2.0-r2.ebuild,
+ +files/1.2.0-tests.patch:
+ add patch from upstream, re-based, improving but not fixing testsute
+ completely
*execnet-1.2.0-r1 (02 Oct 2014)
diff --git a/dev-python/execnet/execnet-1.2.0-r2.ebuild b/dev-python/execnet/execnet-1.2.0-r2.ebuild
new file mode 100644
index 000000000000..9b992b1c5024
--- /dev/null
+++ b/dev-python/execnet/execnet-1.2.0-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/execnet/execnet-1.2.0-r2.ebuild,v 1.1 2014/10/10 13:34:07 idella4 Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Rapid multi-Python deployment"
+HOMEPAGE="http://codespeak.net/execnet/ http://pypi.python.org/pypi/execnet/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/1.2.0-tests.patch )
+
+python_prepare_all() {
+ # Remove doctest that access an i'net site
+ rm doc/example/test_info.txt || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+src_test() {
+ # Tests are a bit fragile to failures in parallel.
+ local DISTUTILS_NO_PARALLEL_BUILD=1
+ distutils-r1_src_test
+}
+
+python_test() {
+ # https://bitbucket.org/hpk42/execnet/issue/10
+ unset PYTHONDONTWRITEBYTECODE
+
+ # https://bitbucket.org/hpk42/execnet/issue/35/test-failures-in-execnet-120
+ py.test || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/execnet/files/1.2.0-tests.patch b/dev-python/execnet/files/1.2.0-tests.patch
new file mode 100644
index 000000000000..13bed5d59605
--- /dev/null
+++ b/dev-python/execnet/files/1.2.0-tests.patch
@@ -0,0 +1,115 @@
+# HG changeset patch
+# User holger krekel <holger@merlinux.eu>
+# Date 1412585605 -7200
+# Node ID c9303c302995a4fb844553d4977c55abc72e2020
+# Parent 47ff3652b0aed191f7bafc741c211d1415f65224
+fix issue35: adapt some doctests, fix some channel tests for py3.
+Also modernize tox.ini a bit.
+--rebased
+diff -ur execnet-1.2.0.orig/doc/example/test_group.txt execnet-1.2.0/doc/example/test_group.txt
+--- doc/example/test_group.txt 2014-01-29 19:50:22.000000000 +0800
++++ doc/example/test_group.txt 2014-10-10 19:51:00.108828123 +0800
+@@ -14,7 +14,7 @@
+ >>> group
+ <Group ['gw0', 'gw1']>
+ >>> list(group)
+- [<PopenGateway id='gw0' receive-live, 0 active channels>, <PopenGateway id='gw1' receive-live, 0 active channels>]
++ [<Gateway id='gw0' receive-live, thread model, 0 active channels>, <Gateway id='gw1' receive-live, thread model, 0 active channels>]
+ >>> 'gw0' in group and 'gw1' in group
+ True
+ >>> group['gw0'] == group[0]
+@@ -37,7 +37,7 @@
+ >>> gw = group.makegateway("popen//id=sub1")
+ >>> assert gw.id == "sub1"
+ >>> group['sub1']
+- <PopenGateway id='sub1' receive-live, 0 active channels>
++ <Gateway id='sub1' receive-live, thread model, 0 active channels>
+
+ Getting (auto) IDs before instantiation
+ ------------------------------------------------------
+diff -ur execnet-1.2.0.orig/doc/example/test_proxy.txt execnet-1.2.0/doc/example/test_proxy.txt
+--- doc/example/test_proxy.txt 2014-01-29 19:50:22.000000000 +0800
++++ doc/example/test_proxy.txt 2014-10-10 19:16:50.380156509 +0800
+@@ -18,10 +18,10 @@
+ >>> group.defaultspec = 'popen//via=master'
+ >>> master = group.makegateway('popen//id=master')
+ >>> master
+- <Gateway id='master' receive-live, 0 active channels>
++ <Gateway id='master' receive-live, thread model, 0 active channels>
+ >>> slave = group.makegateway()
+ >>> slave
+- <Gateway id='gw0' receive-live, 0 active channels>
++ <Gateway id='gw0' receive-live, thread model, 0 active channels>
+ >>> group
+ <Group ['master', 'gw0']>
+
+diff -ur execnet-1.2.0.orig/testing/test_channel.py execnet-1.2.0/testing/test_channel.py
+--- testing/test_channel.py 2014-01-29 19:50:22.000000000 +0800
++++ testing/test_channel.py 2014-10-10 19:21:00.943955387 +0800
+@@ -68,25 +68,19 @@
+
+ def test_channel_error_reporting(self, gw):
+ channel = gw.remote_exec('def foo():\n return foobar()\nfoo()\n')
+- try:
+- channel.receive()
+- except channel.RemoteError:
+- e = sys.exc_info()[1]
+- assert str(e).startswith('Traceback (most recent call last):')
+- assert str(e).find('NameError: global name \'foobar\' '
+- 'is not defined') > -1
+- else:
+- pytest.fail('No exception raised')
++ excinfo = pytest.raises(channel.RemoteError, channel.receive)
++ msg = str(excinfo.value)
++ assert msg.startswith('Traceback (most recent call last):')
++ assert "NameError" in msg
++ assert "foobar" in msg
+
+ def test_channel_syntax_error(self, gw):
+ # missing colon
+ channel = gw.remote_exec('def foo()\n return 1\nfoo()\n')
+- try:
+- channel.receive()
+- except channel.RemoteError:
+- e = sys.exc_info()[1]
+- assert str(e).startswith('Traceback (most recent call last):')
+- assert str(e).find('SyntaxError') > -1
++ excinfo = pytest.raises(channel.RemoteError, channel.receive)
++ msg = str(excinfo.value)
++ assert msg.startswith('Traceback (most recent call last):')
++ assert "SyntaxError" in msg
+
+ def test_channel_iter(self, gw):
+ channel = gw.remote_exec("""
+diff -ur execnet-1.2.0.orig/tox.ini execnet-1.2.0/tox.ini
+--- tox.ini 2014-01-29 19:50:22.000000000 +0800
++++ tox.ini 2014-10-10 20:14:22.806301771 +0800
+@@ -1,16 +1,11 @@
+ [tox]
+-envlist=py26,py27,py32,py33,pypy,flakes
+-distshare={homedir}/.tox/distshare
+-
+-[tox:hudson]
+-distshare={toxworkdir}/distshare
+-sdistsrc={distshare}/execnet-*
++envlist=py26,py27,py33,py34,pypy,flakes
+
+ [testenv]
+ changedir=testing
+ deps=pytest
+ pytest-timeout
+-commands=py.test -rsfxX --junitxml={envlogdir}/junit-{envname}.xml []
++commands=py.test -rsfxX {posargs}
+
+ [testenv:flakes]
+ changedir=
+@@ -26,8 +21,7 @@
+ deps=sphinx
+ pytest
+ commands=
+- py.test \
+- -rsfxX -v --junitxml={envlogdir}/junit-{envname}.xml check_sphinx.py
++ py.test -rsfxX -v check_sphinx.py
+
+ [pytest]
+ timeout = 20