1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
10 if [[ "${PV}" == "9999" ]]; then
12 EGIT_REPO_URI="git://github.com/heynemann/${PN}.git"
15 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
18 DESCRIPTION="Generate Thumbor URLs from Python"
19 HOMEPAGE="https://github.com/thumbor/libthumbor https://pypi.python.org/pypi/libthumbor"
23 KEYWORDS="~amd64 ~x86"
27 dev-python/six[${PYTHON_USEDEP}]
33 dev-python/coverage[${PYTHON_USEDEP}]
34 dev-python/flake8[${PYTHON_USEDEP}]
35 dev-python/nose[${PYTHON_USEDEP}]
36 dev-python/preggy[${PYTHON_USEDEP}]
39 python_prepare_all() {
40 sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests', 'tests.*'])/" setup.py || die
41 distutils-r1_python_prepare_all
45 "${EPYTHON}" -c 'import coverage; coverage.main()' run --branch $(command -v nosetests) --nocapture tests ||
46 die "tests failed with ${EPYTHON}"