*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / virtualenv / virtualenv-15.1.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 pypy3 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Virtual Python Environment builder"
11 HOMEPAGE="
12         https://virtualenv.pypa.io/en/stable/
13         https://pypi.org/project/virtualenv/
14         https://github.com/pypa/virtualenv/
15 "
16 SRC_URI="https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
17
18 LICENSE="MIT"
19 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
20 SLOT="0"
21 IUSE="doc test"
22 RESTRICT="!test? ( test )"
23
24 RDEPEND=""
25 DEPEND="${RDEPEND}
26         >=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]
27         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
28         test? (
29                 dev-python/mock[${PYTHON_USEDEP}]
30                 dev-python/pytest[${PYTHON_USEDEP}]
31         )"
32
33 DOCS=( docs/index.rst docs/changes.rst )
34
35 PATCHES=(
36         "${FILESDIR}"/${PN}-12.1.1-skip-broken-test.patch
37 )
38
39 python_compile_all() {
40         use doc && emake -C docs html
41 }
42
43 python_test() {
44         py.test -v -v || die "Tests fail with ${EPYTHON}"
45 }
46
47 python_install_all() {
48         use doc && local HTML_DOCS=( docs/_build/html/. )
49         distutils-r1_python_install_all
50 }