www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / dev-python / flask-babel / flask-babel-0.12.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
7 inherit distutils-r1
8
9 MY_PN="Flask-Babel"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="i18n and l10n support for Flask based on Babel and pytz"
13 HOMEPAGE="https://pythonhosted.org/Flask-Babel/"
14 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="amd64 ~arm arm64 x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="
23         dev-python/Babel[${PYTHON_USEDEP}]
24         dev-python/flask[${PYTHON_USEDEP}]
25         dev-python/pytz[${PYTHON_USEDEP}]
26         >=dev-python/jinja-2.5[${PYTHON_USEDEP}]
27 "
28 BDEPEND="
29         dev-python/setuptools[${PYTHON_USEDEP}]
30         doc? (
31                 dev-python/flask-sphinx-themes[${PYTHON_USEDEP}]
32                 dev-python/sphinx[${PYTHON_USEDEP}]
33         )
34         test? (
35                 ${RDEPEND}
36                 dev-python/nose[${PYTHON_USEDEP}]
37         )
38 "
39
40 S="${WORKDIR}/${MY_P}"
41
42 python_prepare_all() {
43         sed -i -e "s/, 'sphinx.ext.intersphinx'//" docs/conf.py || die
44         distutils-r1_python_prepare_all
45 }
46
47 python_compile_all() {
48         if use doc; then
49                 sphinx-build docs docs/_build/html || die
50                 HTML_DOCS=( docs/_build/html/. )
51         fi
52 }
53
54 python_test() {
55         nosetests -v || die "Tests failed under ${EPYTHON}"
56 }