*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / wtforms / wtforms-2.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_6} )
7
8 inherit distutils-r1
9
10 MY_PN="WTForms"
11 MY_P="${MY_PN}-${PV}"
12
13 DESCRIPTION="Flexible forms validation and rendering library for python web development"
14 HOMEPAGE="https://wtforms.readthedocs.io/"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="doc test"
21 RESTRICT="!test? ( test )"
22
23 S="${WORKDIR}/${MY_P}"
24
25 RDEPEND="
26         app-arch/unzip
27         dev-python/setuptools[${PYTHON_USEDEP}]
28         doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] )"
29 DEPEND="${RDEPEND}
30         test? (
31                 dev-python/Babel[${PYTHON_USEDEP}]
32                 dev-python/sqlalchemy[${PYTHON_USEDEP}]
33                 dev-python/webob[${PYTHON_USEDEP}]
34                 dev-python/python-dateutil[${PYTHON_USEDEP}]
35         )"
36
37 python_prepare_all() {
38         # Extension-tests are written for an older version of Django
39         sed \
40                 -e "s|'ext_django.tests', ||" \
41                 -i tests/runtests.py || die
42         distutils-r1_python_prepare_all
43 }
44
45 python_compile_all() {
46         use doc && emake -C docs html
47 }
48
49 python_test() {
50         esetup.py test
51 }
52
53 python_install_all() {
54         use doc && local HTML_DOCS=( docs/_build/html/. )
55         distutils-r1_python_install_all
56 }