65d9952c059775c196812b4db23131296eb7c43b
[gentoo.git] / dev-python / frozen-flask / frozen-flask-0.11-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
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
21 RDEPEND=">=dev-python/flask-0.7[${PYTHON_USEDEP}]"
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
25
26 S="${WORKDIR}/${MY_P}"
27
28 python_compile_all() {
29         if use doc; then
30                 sed -e 's:^intersphinx_mapping:#intersphinx_mapping:' -i docs/conf.py || die
31                 mkdir docs/_build || die
32                 sphinx-build -c docs docs docs/_build  || die
33         fi
34 }
35
36 python_test() {
37         nosetests || die Tests failed under $"{EPYTHON}"
38 }
39
40 python_install_all() {
41         use doc && HTML_DOCS=( "${S}"/docs/_build/. )
42         distutils-r1_python_install_all
43 }