From 3af95cd2c504b2d9188ba95c4d45d873700c7d92 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Tue, 22 Mar 2011 15:11:30 +0000 Subject: Require dev-python/simplejson. Disable tests requiring network connection (bug #359775). Don't install tests. (Portage version: 2.2.0_alpha28_p4/cvs/Linux x86_64) --- dev-python/mygpoclient/mygpoclient-1.5.ebuild | 34 ++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'dev-python/mygpoclient/mygpoclient-1.5.ebuild') diff --git a/dev-python/mygpoclient/mygpoclient-1.5.ebuild b/dev-python/mygpoclient/mygpoclient-1.5.ebuild index 2c0c1a2f4a2a..53465239fa79 100644 --- a/dev-python/mygpoclient/mygpoclient-1.5.ebuild +++ b/dev-python/mygpoclient/mygpoclient-1.5.ebuild @@ -1,12 +1,13 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mygpoclient/mygpoclient-1.5.ebuild,v 1.2 2010/10/31 17:35:38 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mygpoclient/mygpoclient-1.5.ebuild,v 1.3 2011/03/22 15:11:30 arfrever Exp $ EAPI=3 -PYTHON_DEPEND="2:2.6" +PYTHON_DEPEND="2" SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.*" +DISTUTILS_SRC_TEST="nosetests" inherit distutils @@ -19,8 +20,29 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="test" -RDEPEND="" +RDEPEND="dev-python/simplejson" DEPEND="${RDEPEND} - test? ( dev-python/coverage + test? ( + dev-python/coverage dev-python/minimock - dev-python/nose )" + )" + +src_prepare() { + distutils_src_prepare + + # Disable tests requring network connection. + rm -f mygpoclient/http_test.py +} + +src_test() { + distutils_src_test --cover-erase --with-coverage --with-doctest --cover-package=mygpoclient +} + +src_install() { + distutils_src_install + + delete_tests() { + rm -f "${ED}$(python_get_sitedir)/mygpoclient/"*_test.py + } + python_execute_function -q delete_tests +} -- cgit v1.2.3-65-gdbad