*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / humanize / humanize-0.5.1.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 python{2_7,3_{6,7}} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Common humanization utilities"
11 HOMEPAGE="https://github.com/jmoiron/humanize/"
12 # Tests are not included in PyPI tarballs
13 # https://github.com/jmoiron/humanize/issues/33
14 SRC_URI="https://github.com/jmoiron/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 BDEPEND="
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
25         test? ( dev-python/mock[${PYTHON_USEDEP}] )
26 "
27
28 python_compile_all() {
29         if use doc; then
30                 cd docs || die
31                 sphinx-build . _build/html || die
32                 HTML_DOCS=( docs/_build/html/. )
33         fi
34 }
35
36 python_test() {
37         esetup.py test || die "tests failed with ${EPYTHON}"
38 }