87ca59027e7180bfe961c281eae8443a7566d555
[gentoo.git] / dev-python / virtualenv / virtualenv-16.7.10.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{2_7,3_{6,7,8,9}} pypy3 )
7 DISTUTILS_USE_SETUPTOOLS=manual
8
9 inherit distutils-r1
10
11 DESCRIPTION="Virtual Python Environment builder"
12 HOMEPAGE="
13         https://virtualenv.pypa.io/en/stable/
14         https://pypi.org/project/virtualenv/
15         https://github.com/pypa/virtualenv/
16 "
17 SRC_URI="https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
18
19 LICENSE="MIT"
20 #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"
21 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
22 SLOT="0"
23 IUSE="test"
24 RESTRICT="!test? ( test )"
25
26 RDEPEND=">=dev-python/setuptools-19.6.2[${PYTHON_USEDEP}]"
27 BDEPEND="${RDEPEND}
28         test? (
29                 >=dev-python/pip-19.3.1-r1[${PYTHON_USEDEP}]
30                 dev-python/mock[${PYTHON_USEDEP}]
31                 dev-python/pypiserver[${PYTHON_USEDEP}]
32                 dev-python/pytest-localserver[${PYTHON_USEDEP}]
33                 dev-python/pytest-timeout[${PYTHON_USEDEP}]
34                 dev-python/pytest[${PYTHON_USEDEP}]
35                 dev-python/six[${PYTHON_USEDEP}]
36                 dev-python/wheel[${PYTHON_USEDEP}]
37         )"
38
39 DOCS=( docs/index.rst docs/changes.rst )
40
41 PATCHES=(
42         "${FILESDIR}/virtualenv-16.7.7-tests.patch"
43
44         # disable tests that need internet access
45         "${FILESDIR}/virtualenv-16.7.7-tests-internet.patch"
46
47         # test fixes for pypy
48         "${FILESDIR}/virtualenv-16.7.8-tests-pypy.patch"
49 )
50
51 distutils_enable_sphinx docs \
52         dev-python/sphinx_rtd_theme \
53         dev-python/towncrier
54
55 python_test() {
56         cp "${S}"/LICENSE.txt "${BUILD_DIR}"/lib || \
57                 die "Could not copy LICENSE.txt with ${EPYTHON}"
58
59         pytest -vv tests || die "Tests fail with ${EPYTHON}"
60 }