You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/django-pipeline/django-pipeline-1.3.11.ebuild

60 lines
1.7 KiB

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/django-pipeline/django-pipeline-1.3.11.ebuild,v 1.2 2013/06/04 16:28:45 floppym Exp $
EAPI=5
# There's doubt in py3.2's readiness
PYTHON_COMPAT=( python{2_6,2_7,3_3} )
inherit distutils-r1
DESCRIPTION="An asset packaging library for Django"
HOMEPAGE="http://pypi.python.org/pypi/django-pipeline/ https://github.com/cyberdelia/django-pipeline"
SRC_URI="https://github.com/cyberdelia/django-pipeline/archive/1.3.11.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc test"
RDEPEND=">=dev-python/django-1.4.1[${PYTHON_USEDEP}]
dev-python/futures[$(python_gen_usedep python{2_6,2_7})]
dev-python/jsmin[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"
python_prepare() {
use test && DISTUTILS_IN_SOURCE_BUILD=1
distutils_python_prepare
}
python_compile_all() {
use doc && emake -C docs html
rm -f docs/_build/doctrees/environment.pickle || die
}
python_compile() {
# Need remove tests before reaching distutils-r1_src_install
if ! use test; then
rm -rf tests/ || die
fi
distutils-r1_python_compile
}
python_test() {
export DJANGO_SETTINGS_MODULE="django.conf"
pushd "${BUILD_DIR}"/lib/tests/ &> /dev/null
ln -sf ../../../tests/assets . || die
ln -sf ../../../tests/assets2 . || die
cd ../../../ || die
django-admin.py-${EPYTHON} test --settings=tests.settings tests \
|| die "Tests failed under ${EPYTHON}"
rm -rf tests/ || die
rm -rf "${S}"/tests/ || einfo "tests folder already removed"
}
python_install_all() {
use doc && HTML_DOCS=( docs/_build/html/. )
distutils-r1_python_install_all
}