summaryrefslogtreecommitdiff
blob: 15831c2640379174e9e2ccd455ebea297737d54c (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"
PYTHON_COMPAT=( python{2_7,3_3} )
PYTHON_MULTIPLE_ABI=1

EGIT_REPO_URI="https://github.com/pycollada/pycollada.git"
[ "${PV}" == 9999 ] || EGIT_COMMIT="v${PV}"

inherit distutils-r1 git-2

DESCRIPTION="python library for reading and writing collada documents"
HOMEPAGE="http://pycollada.github.com/"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"

DEPEND="doc? ( dev-python/sphinx )"
RDEPEND="dev-python/numpy
	dev-python/lxml
	>=dev-python/python-dateutil-2.0
	virtual/python-unittest2"

src_compile()
{
	distutils-r1_src_compile

	if use doc ; then
		pushd docs
		emake html
		popd
	fi
}

src_install()
{
	distutils-r1_src_install

	if use doc ; then
		pushd docs/_build/html
		dohtml -r *
		popd
	fi

	if use examples ; then
		insinto /usr/share/${P}/
		doins -r ${S}/examples
	fi

	install_test_data() {
		insinto $(python_get_sitedir)/collada/tests/
		doins -r ${S}/collada/tests/data
	}
	python_foreach_impl install_test_data
}

src_test()
{
	test_collada() {
		for script in ${S}/collada/tests/*.py
		do
			$EPYTHON "${script}"
		done
	}
	python_foreach_impl test_collada
}