*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / kazoo / kazoo-2.2.1.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="A high-level Python library that makes it easier to use Apache Zookeeper"
10 HOMEPAGE="https://kazoo.readthedocs.org/ https://github.com/python-zk/kazoo/ https://pypi.org/project/kazoo/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86"
16 IUSE="doc gevent test"
17
18 RDEPEND="
19         dev-python/six[${PYTHON_USEDEP}]
20         gevent? ( dev-python/gevent[$(python_gen_usedep 'python2*')] )
21 "
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
25         test? ( dev-python/mock[${PYTHON_USEDEP}] )
26 "
27
28 # not all test deps are in the tree
29 RESTRICT="test"
30
31 python_compile_all() {
32         use doc && { sphinx-build -b html docs docs/_build/html || die; }
33 }
34
35 python_test() {
36         esetup.py test
37 }
38
39 python_install_all() {
40         use doc && local HTML_DOCS=( docs/_build/html/. )
41         local DOCS=( {CHANGES,CONTRIBUTING,README}.rst )
42         distutils-r1_python_install_all
43 }