*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / uvloop / uvloop-0.14.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=( python{3_6,3_7} )
7 inherit distutils-r1
8
9 DESCRIPTION="Ultra-fast implementation of asyncio event loop on top of libuv"
10 HOMEPAGE="https://github.com/magicstack/uvloop"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 KEYWORDS="~amd64 ~x86"
14 LICENSE="MIT"
15 SLOT="0"
16 IUSE="doc examples test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND=">=dev-libs/libuv-1.11.0:="
20 DEPEND="
21         ${RDEPEND}
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         doc? (
24                 >=dev-python/alabaster-0.6.2[${PYTHON_USEDEP}]
25                 dev-python/sphinx[${PYTHON_USEDEP}]
26         )
27         test? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
28 "
29
30 python_prepare_all() {
31         cat <<EOF >> setup.cfg || die
32 [build_ext]
33 use-system-libuv=1
34 EOF
35
36         # flake8 only
37         rm tests/test_sourcecode.py || die
38
39         distutils-r1_python_prepare_all
40 }
41
42 python_compile_all() {
43         use doc && esetup.py build_ext --inplace build_sphinx
44 }
45
46 python_test() {
47         esetup.py test
48 }
49
50 python_install_all() {
51         use examples && dodoc -r examples
52         use doc && local HTML_DOCS=( "${BUILD_DIR}/sphinx/html/." )
53         distutils-r1_python_install_all
54 }