*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / wrapt / wrapt-1.10.10.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1 vcs-snapshot
9
10 DESCRIPTION="Module for decorators, wrappers and monkey patching"
11 HOMEPAGE="https://github.com/GrahamDumpleton/wrapt"
12 SRC_URI="https://github.com/GrahamDumpleton/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 sparc x86 ~amd64-linux"
17 IUSE="doc test"
18 RESTRICT="!test? ( test )"
19
20 DEPEND="
21         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
22         doc? (
23                 dev-python/sphinx[${PYTHON_USEDEP}]
24                 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
25         )
26 "
27 RDEPEND=""
28
29 python_compile_all() {
30         use doc && emake -C docs html
31 }
32
33 python_compile() {
34         local WRAPT_EXTENSIONS=true
35
36         distutils-r1_python_compile
37 }
38
39 python_test() {
40         py.test -vv || 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 }