| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
PYTHON_DEPEND="2"
|
| 7 |
SUPPORT_PYTHON_ABIS=1
|
| 8 |
RESTRICT_PYTHON_ABIS="3.*"
|
| 9 |
inherit distutils
|
| 10 |
|
| 11 |
MY_PN="${PN/-/_}"
|
| 12 |
DESCRIPTION="Allows to define regrouped/postcompiled content 'on the fly' inside of django template"
|
| 13 |
HOMEPAGE="http://pypi.python.org/pypi/django_compressor/"
|
| 14 |
SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
|
| 15 |
KEYWORDS="~amd64 ~x86"
|
| 16 |
IUSE="doc test"
|
| 17 |
|
| 18 |
LICENSE="MIT"
|
| 19 |
SLOT="0"
|
| 20 |
|
| 21 |
PYTHON_MODNAME="compressor"
|
| 22 |
|
| 23 |
# tests I think worked in the live ebuild fine. It's tripping over a
|
| 24 |
# setting missing; COMPRESS_ROOT in compressor/conf.py
|
| 25 |
RESTRICT="test"
|
| 26 |
S=${WORKDIR}/${MY_PN}-${PV}
|
| 27 |
|
| 28 |
RDEPEND=""
|
| 29 |
DEPEND="${RDEPEND} >=dev-python/django-1.1.4
|
| 30 |
dev-python/setuptools
|
| 31 |
dev-python/django-appconf
|
| 32 |
dev-python/versiontools
|
| 33 |
test? ( dev-python/twill )"
|
| 34 |
|
| 35 |
src_test() {
|
| 36 |
export DJANGO_SETTINGS_MODULE="django.conf"
|
| 37 |
testing() {
|
| 38 |
local test
|
| 39 |
for test in tests/tests/*.py
|
| 40 |
do
|
| 41 |
PYTHONPATH=. "$(PYTHON)" "${test}" || die "${test} failed with Python ${PYTHON_ABI}"
|
| 42 |
einfo "Test "${test}" completed OK"
|
| 43 |
done
|
| 44 |
}
|
| 45 |
python_execute_function testing
|
| 46 |
}
|
| 47 |
|
| 48 |
src_install() {
|
| 49 |
distutils_src_install
|
| 50 |
if use doc; then
|
| 51 |
dohtml -r compressor/
|
| 52 |
fi
|
| 53 |
}
|