# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-python/configobj/configobj-4.7.0.ebuild,v 1.1 2010/01/11 09:15:19 arfrever Exp $ EAPI="2" SUPPORT_PYTHON_ABIS="1" inherit eutils distutils DESCRIPTION="Simple config file reader and writer" HOMEPAGE="http://www.voidspace.org.uk/python/configobj.html http://code.google.com/p/configobj/ http://pypi.python.org/pypi/configobj" SRC_URI="mirror://sourceforge/${PN}/${P}.zip" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos" IUSE="doc" DEPEND="app-arch/unzip" RDEPEND="" RESTRICT_PYTHON_ABIS="3.*" PYTHON_MODNAME="configobj.py validate.py" src_prepare() { epatch "${FILESDIR}/${PN}-4.6.0-bad-tests.patch" sed -e "s/ \(doctest\.testmod(.*\)/ sys.exit(\1[0] != 0)/" -i validate.py } src_test() { testing() { PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" validate.py -v } python_execute_function testing } src_install() { distutils_src_install if use doc; then rm -f docs/BSD* insinto /usr/share/doc/${PF}/html doins -r docs/* || die "doins failed" fi }