summaryrefslogtreecommitdiff
blob: 7ddce39ad49b5a67d366ac0f2474f52530ef7260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/configobj/configobj-4.5.3.ebuild,v 1.1 2009/01/14 16:41:11 bicatali Exp $

NEED_PYTHON=2.4

inherit distutils

KEYWORDS="~amd64 ~x86"

DESCRIPTION="Simple config file reader and writer"
HOMEPAGE="http://www.voidspace.org.uk/python/configobj.html"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
LICENSE="BSD"
SLOT="0"
IUSE="doc"

DEPEND="app-arch/unzip"
RDEPEND=""

DOCS="docs/configobj.txt docs/validate.txt"

src_install() {
	distutils_src_install
	if use doc ; then
		rm -f docs/BSD*
		insinto /usr/share/doc/${PF}/html
		doins -r docs/* || die
	fi
}

src_test() {
	distutils_python_version
	sed -i \
		-e 's/ \(doctest\.testmod(.*\)/ sys.exit(\1[0] != 0)/' \
		configobj_test.py
	PYTHONPATH=build/lib "${python}" configobj_test.py -v \
		|| die "configobj_test.py failed"
}