diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-04-20 01:41:33 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-04-20 01:41:33 +0000 |
commit | bce07bfe3dcccfa04c89b5ce97c6777da78d0c67 (patch) | |
tree | c481c809698233a501166f228e0ebb7a0cff848e /dev-python | |
parent | Add missing dependency: dev-util/intltool (diff) | |
download | gentoo-2-bce07bfe3dcccfa04c89b5ce97c6777da78d0c67.tar.gz gentoo-2-bce07bfe3dcccfa04c89b5ce97c6777da78d0c67.tar.bz2 gentoo-2-bce07bfe3dcccfa04c89b5ce97c6777da78d0c67.zip |
Rebase ebuild from 0.22.0, restoring python 3 support. Use separate source directories as this makes the test suite pass in python 2. TODO: Figure out why.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/astng/ChangeLog | 7 | ||||
-rw-r--r-- | dev-python/astng/astng-0.23.1.ebuild | 33 |
2 files changed, 13 insertions, 27 deletions
diff --git a/dev-python/astng/ChangeLog b/dev-python/astng/ChangeLog index 7bff2d7e0e0f..aea15fb9117f 100644 --- a/dev-python/astng/ChangeLog +++ b/dev-python/astng/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-python/astng # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/ChangeLog,v 1.54 2012/04/19 06:45:24 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/ChangeLog,v 1.55 2012/04/20 01:41:33 floppym Exp $ + + 20 Apr 2012; Mike Gilbert <floppym@gentoo.org> astng-0.23.1.ebuild: + Rebase ebuild from 0.22.0, restoring python 3 support. Use separate source + directories as this makes the test suite pass in python 2. TODO: Figure out + why. *astng-0.23.1 (19 Apr 2012) diff --git a/dev-python/astng/astng-0.23.1.ebuild b/dev-python/astng/astng-0.23.1.ebuild index 236af4137055..989673cebaba 100644 --- a/dev-python/astng/astng-0.23.1.ebuild +++ b/dev-python/astng/astng-0.23.1.ebuild @@ -1,12 +1,10 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.3 2012/04/20 00:53:40 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.4 2012/04/20 01:41:33 floppym Exp $ EAPI="4" -PYTHON_DEPEND="2" SUPPORT_PYTHON_ABIS="1" -PYTHON_TESTS_FAILURES_TOLERANT_ABIS="3.* *-jython" -RESTRICT_PYTHON_ABIS="3.* *-pypy-* *-jython" +PYTHON_TESTS_RESTRICTED_ABIS="3.* *-jython *-pypy-*" inherit distutils @@ -23,24 +21,11 @@ IUSE="test" RDEPEND=">=dev-python/logilab-common-0.53.0" DEPEND="${RDEPEND} dev-python/setuptools - test? ( >=dev-python/egenix-mx-base-3.0.0 ) - ( dev-python/unittest2 )" + test? ( >=dev-python/egenix-mx-base-3.0.0 )" S="${WORKDIR}/logilab-${P}" - -DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" - PYTHON_MODNAME="logilab/astng" - -src_prepare() { - distutils_src_prepare - - conversion() { - [[ "${PYTHON_ABI}" == 2.* ]] && return - find -name "*.py" ! -name "setup.py" -print | xargs 2to3-${PYTHON_ABI} -nw --no-diffs - } - python_execute_function -s conversion -} +DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" src_test() { testing() { @@ -50,16 +35,12 @@ src_test() { mkdir -p "${spath}/logilab" || return 1 cp -r "$(python_get_sitedir)/logilab/common" "${spath}/logilab" || return 1 - "$(PYTHON)" setup.py install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation) $(python_get_version)" + "$(PYTHON)" setup.py build -b build install --root="${tpath}" || + die "Installation for tests failed with $(python_get_implementation_and_version)" # pytest uses tests placed relatively to the current directory. pushd "${spath}/logilab/astng" > /dev/null || return 1 - if [[ "${PYTHON_ABI}" == 3.* ]]; then - # Support for Python 3 is experimental. Some tests are known to fail. - PYTHONPATH="${spath}" pytest -v - else - PYTHONPATH="${spath}" pytest -v || return 1 - fi + PYTHONPATH="${spath}" pytest -v || return 1 popd > /dev/null || return 1 } python_execute_function -s testing |