1 # Copyright 1999-2013 Gentoo Foundation |
|
2 # Distributed under the terms of the GNU General Public License v2 |
|
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/django-pipeline/django-pipeline-1.2.9.ebuild,v 1.6 2013/01/21 05:46:14 idella4 Exp $ |
|
4 |
|
5 EAPI=4 |
|
6 PYTHON_DEPEND="2:2.6" |
|
7 SUPPORT_PYTHON_ABIS=1 |
|
8 RESTRICT_PYTHON_ABIS="2.5 3.* *-jython" |
|
9 |
|
10 inherit distutils |
|
11 |
|
12 DESCRIPTION="An asset packaging library for Django" |
|
13 HOMEPAGE="http://pypi.python.org/pypi/django-pipeline/" |
|
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
|
15 |
|
16 KEYWORDS="~amd64 ~x86" |
|
17 IUSE="doc" |
|
18 |
|
19 LICENSE="MIT" |
|
20 SLOT="0" |
|
21 PYTHON_MODNAME="pipeline" |
|
22 DISTUTILS_SRC_TEST=nosetests |
|
23 RDEPEND=">=dev-python/django-1.4" |
|
24 DEPEND="${RDEPEND} |
|
25 dev-python/setuptools" |
|
26 |
|
27 src_compile() { |
|
28 use doc && emake -C docs html |
|
29 rm -f docs/_build/doctrees/environment.pickle || die |
|
30 distutils_src_compile |
|
31 } |
|
32 |
|
33 src_test() { |
|
34 export DJANGO_SETTINGS_MODULE="django.conf" |
|
35 # Python.[56] trigger a harmless deprecation warning |
|
36 testing() { |
|
37 local exit_status=0 test |
|
38 pushd build-${PYTHON_ABI}/lib/tests/tests/ > /dev/null || die |
|
39 PYTHONPATH=. |
|
40 for test in [a-z]*.py |
|
41 do |
|
42 if ! "$(PYTHON)" ${test}; then |
|
43 eerror "test "${test}" failed" |
|
44 exit_status="1" |
|
45 else |
|
46 einfo "test "${test}" passed OK" |
|
47 fi |
|
48 done |
|
49 popd > /dev/null |
|
50 return ${exit_status} |
|
51 } |
|
52 python_execute_function testing |
|
53 } |
|
54 |
|
55 src_install() { |
|
56 distutils_src_install |
|
57 |
|
58 if use doc; then |
|
59 dohtml -r docs/_build/html/ |
|
60 fi |
|
61 |
|
62 # Remove un-needed tests to avoid file collisions |
|
63 rmtests() { |
|
64 rm -rf "${ED}"/$(python_get_sitedir)/tests/ || die |
|
65 } |
|
66 |
|
67 python_execute_function rmtests |
|
68 } |
|