fa48462ee01e87638c80d9421f17411ad18f9e8f
[gentoo.git] / dev-python / sphinxcontrib-spelling / sphinxcontrib-spelling-2.1.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python2_7 python3_6 )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Sphinx spelling extension"
10 HOMEPAGE="https://bitbucket.org/dhellmann/sphinxcontrib-spelling"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="BSD-2"
14 SLOT="0"
15 KEYWORDS="amd64 arm ~arm64 x86"
16 IUSE="doc test"
17 RESTRICT="!test? ( test )"
18
19 CDEPEND="
20         dev-python/pbr[${PYTHON_USEDEP}]
21         >=dev-python/pyenchant-1.6.5[${PYTHON_USEDEP}]
22         dev-python/six[${PYTHON_USEDEP}]
23         >=dev-python/sphinx-0.6[${PYTHON_USEDEP}]
24 "
25 DEPEND="
26         dev-python/setuptools[${PYTHON_USEDEP}]
27         doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] )
28         test? (
29                 ${CDEPEND}
30                 dev-python/nose[${PYTHON_USEDEP}]
31         )
32 "
33 RDEPEND="${CDEPEND}"
34
35 python_compile_all() {
36         use doc && emake -C docs html
37 }
38
39 python_test() {
40         nosetests || die "tests failed under ${EPYTHON}"
41 }
42
43 python_install_all() {
44         use doc && local HTML_DOCS=( docs/build/html/. )
45
46         distutils-r1_python_install_all
47 }