dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / flask-babelex / flask-babelex-0.9.3.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 python3_{4,5} )
6
7 inherit distutils-r1
8
9 MY_PN="Flask-BabelEx"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Adds i18n/l10n support to Flask applications"
13 HOMEPAGE="https://github.com/mrjoes/flask-babelex https://pypi.python.org/pypi/Flask-BabelEx"
14 SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc"
20
21 RDEPEND="dev-python/flask[${PYTHON_USEDEP}]
22         >=dev-python/Babel-1[${PYTHON_USEDEP}]
23         >=dev-python/speaklater-1.2[${PYTHON_USEDEP}]
24         >=dev-python/jinja-2.5[${PYTHON_USEDEP}]"
25 DEPEND="${RDEPEND}
26         dev-python/setuptools[${PYTHON_USEDEP}]
27         doc? (
28                 dev-python/sphinx[${PYTHON_USEDEP}]
29                 dev-python/flask-sphinx-themes[${PYTHON_USEDEP}]
30         )"
31
32 PATCHES=( "${FILESDIR}/${P}-tests-fix.patch" )
33
34 S="${WORKDIR}/${MY_P}"
35
36 python_compile_all() {
37         use doc && emake -C docs html
38 }
39
40 python_test() {
41         cd tests || die
42         "${PYTHON}" tests.py || die "Testing failed with ${EPYTHON}"
43 }
44
45 python_install_all() {
46         use doc && local HTML_DOCS=( docs/_build/html/. )
47         distutils-r1_python_install_all
48 }