summaryrefslogtreecommitdiff
blob: 377ee26e56d15b7e5328aba22c69bb63d3563b23 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/gnosis-utils/gnosis-utils-1.2.1.ebuild,v 1.6 2009/08/14 21:02:01 arfrever Exp $

EAPI="2"
NEED_PYTHON="2.1"

inherit distutils

MY_P=Gnosis_Utils-${PV}

DESCRIPTION="XML pickling and objectification with Python."
SRC_URI="http://www.gnosis.cx/download/${MY_P}.tar.gz"
HOMEPAGE="http://www.gnosis.cx/download/"
SLOT="0"
KEYWORDS="~amd64 ia64 x86"
LICENSE="PYTHON"
IUSE=""

DEPEND=""
RDEPEND=""

PYTHON_MODNAME="gnosis"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	distutils_src_prepare

	sed -e "s/with/with_/" -i gnosis/util/convert/pyfontify.py || die "sed failed"
}

src_install() {
	dodoc README gnosis/doc/{*.txt,readme,GETTING_HELP,*ANNOUNCE}
	newdoc gnosis/anon/README README.anon
	newdoc gnosis/xml/relax/README README.relax.xml

	# This setup.py installs files according to the MANIFEST.
	# README and MANIFEST have to get out, otherwise they may
	# generate collissions because they're directly installed in
	# site-packages.
	sed -i \
		-e '/README/d' \
		-e '/MANIFEST/d' \
		-e '/gnosis\/doc/d' \
		MANIFEST || die "sed failed"

	distutils_src_install
}

src_test() {
	python_version
	cd "${S}"/gnosis/xml/pickle/test
	PYTHONPATH="${S}/build/lib" ${python} test_all.py || die "tests failed."
}