diff options
author | Mike Gilbert <floppym@gentoo.org> | 2014-04-01 01:18:40 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-04-01 01:18:40 +0000 |
commit | 9eccb73b9abe88379a61d09f70e046af51e22aee (patch) | |
tree | 3b0cb52974a3f2539a5553f7e4bbc75a89da7102 /dev-python/nose | |
parent | Add python3.4. (diff) | |
download | gentoo-2-9eccb73b9abe88379a61d09f70e046af51e22aee.tar.gz gentoo-2-9eccb73b9abe88379a61d09f70e046af51e22aee.tar.bz2 gentoo-2-9eccb73b9abe88379a61d09f70e046af51e22aee.zip |
Version bump. Add python3.4.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'dev-python/nose')
-rw-r--r-- | dev-python/nose/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/nose/files/nose-1.3.1-python3.4.patch | 41 | ||||
-rw-r--r-- | dev-python/nose/nose-1.3.1.ebuild | 88 | ||||
-rw-r--r-- | dev-python/nose/nose-9999.ebuild | 4 |
4 files changed, 138 insertions, 3 deletions
diff --git a/dev-python/nose/ChangeLog b/dev-python/nose/ChangeLog index e81532f13979..002e0e9d1eed 100644 --- a/dev-python/nose/ChangeLog +++ b/dev-python/nose/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/nose # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/nose/ChangeLog,v 1.122 2014/03/31 21:19:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/nose/ChangeLog,v 1.123 2014/04/01 01:18:40 floppym Exp $ + +*nose-1.3.1 (01 Apr 2014) + + 01 Apr 2014; Mike Gilbert <floppym@gentoo.org> + +files/nose-1.3.1-python3.4.patch, +nose-1.3.1.ebuild, nose-9999.ebuild: + Version bump. Add python3.4. 31 Mar 2014; Michał Górny <mgorny@gentoo.org> nose-1.1.2-r1.ebuild, nose-1.2.1.ebuild, nose-1.2.1_p2012.ebuild, nose-1.3.0.ebuild, diff --git a/dev-python/nose/files/nose-1.3.1-python3.4.patch b/dev-python/nose/files/nose-1.3.1-python3.4.patch new file mode 100644 index 000000000000..2269f755c3f0 --- /dev/null +++ b/dev-python/nose/files/nose-1.3.1-python3.4.patch @@ -0,0 +1,41 @@ +From 192694ed9f70447317bd54e427a17208bddf03be Mon Sep 17 00:00:00 2001 +From: John Szakmeister <john@szakmeister.net> +Date: Sat, 15 Mar 2014 06:15:42 -0400 +Subject: [PATCH] Fix #783: try_run is broken with Python 3.4 + +It turns out that we expected inspect.getargspec() to only work on +functions (versus classes that are callable). Python 3.4 has changed +this behavior and now happily returns the arg spec. Let's try to detect +this situation by checking the __call__() method to if it's actually the +method of a class. If so, pop the 'self' argument off of args--similar +to what's done in the exceptional case below. +--- + CHANGELOG | 1 + + nose/util.py | 4 +++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/nose/util.py b/nose/util.py +index 7995700..dcb5fef 100644 +--- a/nose/util.py ++++ b/nose/util.py +@@ -8,7 +8,7 @@ + import sys + import types + import unittest +-from nose.pyversion import ClassType, TypeType, isgenerator ++from nose.pyversion import ClassType, TypeType, isgenerator, ismethod + + + log = logging.getLogger('nose') +@@ -449,6 +449,8 @@ def try_run(obj, names): + # py.test compatibility + try: + args, varargs, varkw, defaults = inspect.getargspec(func) ++ if hasattr(func, '__call__') and ismethod(func.__call__): ++ args.pop(0) + except TypeError: + # Not a function. If it's callable, call it anyway + if hasattr(func, '__call__'): +-- +1.8.5.5 + diff --git a/dev-python/nose/nose-1.3.1.ebuild b/dev-python/nose/nose-1.3.1.ebuild new file mode 100644 index 000000000000..c692ef253cf9 --- /dev/null +++ b/dev-python/nose/nose-1.3.1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/nose/nose-1.3.1.ebuild,v 1.1 2014/04/01 01:18:40 floppym Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 ) +inherit distutils-r1 eutils + +DESCRIPTION="A unittest extension offering automatic test suite discovery and easy test authoring" +HOMEPAGE="http://pypi.python.org/pypi/nose http://readthedocs.org/docs/nose/ https://bitbucket.org/jpellerin/nose" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="doc examples test" + +RDEPEND="dev-python/coverage[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + doc? ( >=dev-python/sphinx-0.6 ) + test? ( dev-python/twisted-core + dev-python/unittest2 )" + +DOCS=( AUTHORS ) +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-skiptest.patch + "${FILESDIR}"/${PN}-1.3.1-python3.4.patch +) + +python_prepare_all() { + # Tests need to be converted, and they don't respect BUILD_DIR. + use test && DISTUTILS_IN_SOURCE_BUILD=1 + + # Disable tests requiring network connection. + sed \ + -e "s/test_resolve/_&/g" \ + -e "s/test_raises_bad_return/_&/g" \ + -e "s/test_raises_twisted_error/_&/g" \ + -i unit_tests/test_twisted.py || die "sed failed" + # Disable versioning of nosetests script to avoid collision with + # versioning performed by the eclass. + sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \ + -i setup.py || die "sed2 failed" + + distutils-r1_python_prepare_all +} + +python_compile() { + local add_targets=() + + if use test; then + add_targets+=( egg_info ) + python_is_python3 && add_targets+=( build_tests ) + fi + + distutils-r1_python_compile ${add_targets[@]} +} + +python_compile_all() { + use doc && emake -C doc html +} + +src_test() { + # nosetests use heavy multiprocessing during the tests. + # this shall make them less likely to kill your system or timeout. + local DISTUTILS_NO_PARALLEL_BUILD=1 + + distutils-r1_src_test +} + +python_test() { + "${PYTHON}" selftest.py || die "Tests fail with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install --install-data "${EPREFIX}/usr/share" +} + +python_install_all() { + local EXAMPLES=( examples/. ) + distutils-r1_python_install_all + + if use doc; then + dohtml -r -A txt doc/.build/html/. + fi +} diff --git a/dev-python/nose/nose-9999.ebuild b/dev-python/nose/nose-9999.ebuild index b40f73bf8d06..8b57e9e63c02 100644 --- a/dev-python/nose/nose-9999.ebuild +++ b/dev-python/nose/nose-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/nose/nose-9999.ebuild,v 1.8 2014/03/31 21:19:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/nose/nose-9999.ebuild,v 1.9 2014/04/01 01:18:40 floppym Exp $ EAPI=5 @@ -10,7 +10,7 @@ EGIT_REPO_URI="git://github.com/nose-devs/${PN}.git inherit git-2 #endif -PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy pypy2_0 ) +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} pypy pypy2_0 ) inherit distutils-r1 eutils DESCRIPTION="A unittest extension offering automatic test suite discovery and easy test authoring" |