diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-10-05 14:51:33 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-10-05 14:51:33 +0000 |
commit | 9d69b4c983390173b03637d54c2e656c67e10dd3 (patch) | |
tree | aff44c95bb828396db95e9a3dce3530e0fc6fa44 /dev-python/unittest2 | |
parent | Automated update. (diff) | |
download | gentoo-2-9d69b4c983390173b03637d54c2e656c67e10dd3.tar.gz gentoo-2-9d69b4c983390173b03637d54c2e656c67e10dd3.tar.bz2 gentoo-2-9d69b4c983390173b03637d54c2e656c67e10dd3.zip |
Fix not applying anti-versioning patch for py3 & py3.3 test failure (bug #450762). Drop old.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'dev-python/unittest2')
-rw-r--r-- | dev-python/unittest2/ChangeLog | 9 | ||||
-rw-r--r-- | dev-python/unittest2/unittest2-0.5.1-r2.ebuild | 68 | ||||
-rw-r--r-- | dev-python/unittest2/unittest2-0.5.1.ebuild | 48 |
3 files changed, 76 insertions, 49 deletions
diff --git a/dev-python/unittest2/ChangeLog b/dev-python/unittest2/ChangeLog index b0f34406dd9f..c2a605c024b5 100644 --- a/dev-python/unittest2/ChangeLog +++ b/dev-python/unittest2/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/unittest2 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/unittest2/ChangeLog,v 1.36 2013/09/05 18:45:59 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/unittest2/ChangeLog,v 1.37 2013/10/05 14:51:33 mgorny Exp $ + +*unittest2-0.5.1-r2 (05 Oct 2013) + + 05 Oct 2013; Michał Górny <mgorny@gentoo.org> +unittest2-0.5.1-r2.ebuild, + -unittest2-0.5.1.ebuild: + Fix not applying anti-versioning patch for py3 & py3.3 test failure (bug + #450762). Drop old. 05 Sep 2013; Michał Górny <mgorny@gentoo.org> unittest2-0.5.1-r1.ebuild: Clean up PYTHON_COMPAT from old implementations. diff --git a/dev-python/unittest2/unittest2-0.5.1-r2.ebuild b/dev-python/unittest2/unittest2-0.5.1-r2.ebuild new file mode 100644 index 000000000000..d1fd171ba3f0 --- /dev/null +++ b/dev-python/unittest2/unittest2-0.5.1-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/unittest2/unittest2-0.5.1-r2.ebuild,v 1.1 2013/10/05 14:51:33 mgorny Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 ) + +inherit distutils-r1 + +PY3_P=${PN}py3k-${PV} + +DESCRIPTION="The new features in unittest for Python 2.7 backported to Python 2.4+" +HOMEPAGE="http://pypi.python.org/pypi/unittest2 + http://pypi.python.org/pypi/unittest2py3k http://code.google.com/p/unittest-ext/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + mirror://pypi/${PN:0:1}/${PN}/${PY3_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND}" + +python_prepare_all() { + local d + for d in "${S}" "${WORKDIR}"/${PY3_P}; do + # Disable versioning of unit2 script to avoid collision with versioning performed by distutils_src_install(). + sed -i -e "/'%s = unittest2:main_' % SCRIPT2,/d" \ + "${d}"/setup.py || die + + sed -i -e '/No module named/s/self.*$/pass/' \ + "${d}"/unittest2/test/test_loader.py || die + done + + distutils-r1_python_prepare_all +} + +select_source() { + if [[ ${EPYTHON} == python3* ]]; then + cd "${WORKDIR}"/${PY3_P} || die + else + cd "${S}" || die + fi +} + +python_compile() { + select_source + distutils-r1_python_compile +} + +src_test() { + # multiprocessing causes test failure with signals + local DISTUTILS_NO_PARALLEL_BUILD=1 + + distutils-r1_src_test +} + +python_test() { + cd "${BUILD_DIR}" || die + scripts/unit2 discover -s lib || die "Tests fail with ${EPYTHON}" +} + +python_install() { + select_source + distutils-r1_python_install +} diff --git a/dev-python/unittest2/unittest2-0.5.1.ebuild b/dev-python/unittest2/unittest2-0.5.1.ebuild deleted file mode 100644 index 60651063effb..000000000000 --- a/dev-python/unittest2/unittest2-0.5.1.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/unittest2/unittest2-0.5.1.ebuild,v 1.18 2011/07/26 16:26:56 neurogeek Exp $ - -EAPI="3" -SUPPORT_PYTHON_ABIS="1" -# http://hg.python.org/unittest2/rev/d2be68aedc8e -PYTHON_TESTS_RESTRICTED_ABIS="2.4" - -inherit distutils - -DESCRIPTION="The new features in unittest for Python 2.7 backported to Python 2.4+." -HOMEPAGE="http://pypi.python.org/pypi/unittest2 http://pypi.python.org/pypi/unittest2py3k http://code.google.com/p/unittest-ext/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz - mirror://pypi/${PN:0:1}/${PN}py3k/${PN}py3k-${PV}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="" - -DEPEND="dev-python/setuptools" -RDEPEND="${DEPEND}" - -DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" - -DOCS="README.txt" - -src_prepare() { - preparation() { - if [[ "${PYTHON_ABI}" == 3.* ]]; then - cp -pr "${WORKDIR}/${PN}py3k-${PV}" "${S}-${PYTHON_ABI}" || return 1 - else - cp -pr "${S}" "${S}-${PYTHON_ABI}" || return 1 - fi - - # Disable versioning of unit2 script to avoid collision with versioning performed by distutils_src_install(). - sed -e "/'%s = unittest2:main_' % SCRIPT2,/d" -i "${S}-${PYTHON_ABI}/setup.py" || return 1 - } - python_execute_function -q preparation -} - -src_test() { - testing() { - ./unit2 discover - } - python_execute_function -s testing -} |