*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / flask-restful / flask-restful-0.3.7.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python2_7 python3_{6,7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Simple framework for creating REST APIs"
10 HOMEPAGE="https://flask-restful.readthedocs.io/en/latest/ https://github.com/twilio/flask-restful/"
11 SRC_URI="https://github.com/twilio/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86"
16 IUSE="doc examples paging test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         >=dev-python/aniso8601-0.82[${PYTHON_USEDEP}]
21         >=dev-python/flask-0.8[${PYTHON_USEDEP}]
22         >=dev-python/six-1.3.0[${PYTHON_USEDEP}]
23         dev-python/pytz[${PYTHON_USEDEP}]
24         paging? ( >=dev-python/pycrypto-2.6[${PYTHON_USEDEP}] )
25 "
26 DEPEND="${RDEPEND}
27         dev-python/sphinx[${PYTHON_USEDEP}]
28         test? (
29                 dev-python/mock[${PYTHON_USEDEP}]
30                 dev-python/nose[${PYTHON_USEDEP}]
31                 dev-python/pycrypto[${PYTHON_USEDEP}]
32         )
33 "
34
35 python_test() {
36         nosetests -v || die "Tests fail with ${EPYTHON}"
37 }
38
39 python_compile_all() {
40         cd docs || die
41         emake man $(usex doc html "")
42 }
43
44 python_install_all() {
45         use doc && local HTML_DOCS=( docs/_build/html/. )
46         use examples && dodoc -r examples
47         local DOCS=( AUTHORS.md CHANGES.md CONTRIBUTING.md README.md )
48
49         doman docs/_build/man/*
50         distutils-r1_python_install_all
51 }