dev-python/inflection: Support PyPy{,3}, fix DESCRIPTION
[gentoo.git] / dev-python / inflection / inflection-0.3.1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( pypy{,3} python{2_7,3_{4,5,6}} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="A port of Ruby on Rails' inflector to Python"
10 HOMEPAGE="https://github.com/jpvanhal/inflection"
11 # PyPI tarballs don't include doc
12 # https://github.com/jpvanhal/inflection/pull/12
13 SRC_URI="https://github.com/jpvanhal/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="doc test"
19
20 RDEPEND=""
21 DEPEND="
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         test? (
24                 dev-python/pytest-runner[${PYTHON_USEDEP}]
25                 dev-python/pytest[${PYTHON_USEDEP}]
26         )
27         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
28 "
29
30 python_compile_all() {
31         if use doc; then
32                 sphinx-build docs docs/_build/html || die
33                 HTML_DOCS=( docs/_build/html/. )
34         fi
35 }
36
37 python_test() {
38         py.test || die "Tests failed with ${EPYTHON}"
39 }