diff -ur kiwi.orig/kiwi-1.9.29.ebuild kiwi/kiwi-1.9.29.ebuild --- kiwi.orig/kiwi-1.9.29.ebuild 2012-03-16 19:57:06.087615340 +0800 +++ kiwi/kiwi-1.9.29.ebuild 2012-03-16 20:10:32.962610381 +0800 @@ -2,12 +2,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-python/kiwi/kiwi-1.9.29.ebuild,v 1.5 2012/02/24 08:02:35 patrick Exp $ -EAPI="3" -PYTHON_DEPEND="2:2.6" +EAPI="4" +PYTHON_DEPEND="2:2.7" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="2.4 2.5 3.* *-jython 2.7-pypy-*" -inherit distutils versionator +inherit distutils versionator eutils DESCRIPTION="Kiwi is a pure Python framework and set of enhanced PyGTK widgets" HOMEPAGE="http://www.async.com.br/projects/kiwi/" @@ -16,15 +16,28 @@ LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-interix ~amd64-linux ~x86-linux" -IUSE="examples" +IUSE="examples test" DEPEND=">=dev-python/pygtk-2.8" RDEPEND="${DEPEND}" -DISTUTILS_SRC_TEST="tests/run_all_tests.py" src_prepare() { distutils_src_prepare sed -e "s:share/doc/kiwi:share/doc/${PF}:g" -i setup.py || die "sed failed" + + # Remove troublesome test that calls non existant module + rm tests/test_utils.py || die "rm failed" + sed -e 's:testdir, 'ui':testdir, 'kiwi/ui':' -i tests/test_ui.py || die "sed test failed" + # Remove test calling non existant glade object simple_button.ui + epatch "${FILESDIR}"/${P}-glade.patch || die "glade dead" +} + +src_test() { + testing() { + cd tests && mkdir ui || die + "$(PYTHON)" run_all_tests.py + } + python_execute_function testing } src_install() {