bd6ddcdf57ec02f6eabc568c09623c1fdc4de292
[gentoo.git] / dev-python / frozen-flask / frozen-flask-0.11-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python2_7 python3_5 )
6
7 inherit distutils-r1
8
9 MY_PN="Frozen-Flask"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="Freezes a Flask application into a set of static files"
13 HOMEPAGE="https://github.com/SimonSapin/Frozen-Flask https://pypi.org/project/Frozen-Flask/"
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 x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND=">=dev-python/flask-0.7[${PYTHON_USEDEP}]"
23 DEPEND="${RDEPEND}
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
26
27 S="${WORKDIR}/${MY_P}"
28
29 python_compile_all() {
30         if use doc; then
31                 sed -e 's:^intersphinx_mapping:#intersphinx_mapping:' -i docs/conf.py || die
32                 mkdir docs/_build || die
33                 sphinx-build -c docs docs docs/_build  || die
34         fi
35 }
36
37 python_test() {
38         nosetests || die Tests failed under $"{EPYTHON}"
39 }
40
41 python_install_all() {
42         use doc && HTML_DOCS=( "${S}"/docs/_build/. )
43         distutils-r1_python_install_all
44 }