*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / six / six-1.12.0.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} pypy3 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python 2 and 3 compatibility library"
11 HOMEPAGE="https://github.com/benjaminp/six https://pypi.org/project/six/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="doc test"
18 RESTRICT="!test? ( test )"
19
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         doc? ( dev-python/sphinx )
23         test? ( >=dev-python/pytest-2.2.0[${PYTHON_USEDEP}] )"
24
25 PATCHES=(
26         "${FILESDIR}"/1.9.0-mapping.patch
27 )
28
29 python_compile_all() {
30         use doc && emake -C documentation html
31 }
32
33 python_test() {
34         pytest -vv || die "Testing failed with ${EPYTHON}"
35 }
36
37 python_install_all() {
38         use doc && local HTML_DOCS=( documentation/_build/html/. )
39         distutils-r1_python_install_all
40 }