summaryrefslogtreecommitdiff
blob: 1b9ed4ff6b633920be54bdb6dec34a39815a3d32 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit distutils

DESCRIPTION="Python library for working with RDF"
HOMEPAGE="http://rdflib.net/"
SRC_URI="http://rdflib.net/${P}.tar.gz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~x86"
IUSE="test"

DEPEND=">=dev-python/setuptools-0.6_rc5
	test? ( >=dev-python/nose-0.9.2 )"
RDEPEND=""

src_unpack() {
	unpack ${A}
	cd "${S}"

	# Don't install tests, it's rude
	# remove tests_require to prevent setuptools
	# from trying to download deps that it can't find
	sed -i \
		-e "s/\(find_packages(\)/\1exclude=('test','test.*')/" \
		-e "/tests_require/d" \
		setup.py || die "sed in setup.py failed"
}

src_install() {
	distutils_src_install

	insinto /usr/share/doc/${PF}/examples
	doins -r examples/*
}

src_test() {
	# works without setting PYTHONPATH
	${python} setup.py test || die "tests failed"
}