4785489816a49d2197af771dec1a805d6a1a7053
[gentoo.git] / dev-python / humanize / humanize-2.0.0.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 python3_{6,7,8} )
7 # The package uses pkg_resources to determine its version
8 DISTUTILS_USE_SETUPTOOLS=manual
9
10 inherit distutils-r1
11
12 DESCRIPTION="Common humanization utilities"
13 HOMEPAGE="https://github.com/jmoiron/humanize/"
14 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
23 BDEPEND="
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         dev-python/setuptools_scm[${PYTHON_USEDEP}]
26         test? (
27                 dev-python/freezegun[${PYTHON_USEDEP}]
28                 dev-python/pytest[${PYTHON_USEDEP}]
29         )
30 "
31
32 python_test() {
33         # The package uses pkg_resources to determine its version
34         distutils_install_for_testing
35         pytest -vv || die "Tests fail with ${EPYTHON}"
36 }