sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / dev-python / pytest-shutil / pytest-shutil-1.7.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 DISTUTILS_USE_SETUPTOOLS=rdepend
7 PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="A goodie-bag of unix shell and environment tools for py.test"
12 HOMEPAGE="https://github.com/man-group/pytest-plugins https://pypi.org/project/pytest-shutil/"
13 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND="
22         dev-python/pytest[${PYTHON_USEDEP}]
23         dev-python/six[${PYTHON_USEDEP}]
24         dev-python/contextlib2[${PYTHON_USEDEP}]
25         dev-python/execnet[${PYTHON_USEDEP}]
26         dev-python/path-py[${PYTHON_USEDEP}]
27         dev-python/mock[${PYTHON_USEDEP}]
28         dev-python/termcolor[${PYTHON_USEDEP}]
29 "
30
31 BDEPEND="
32         ${RDEPEND}
33         dev-python/setuptools-git[${PYTHON_USEDEP}]
34 "
35
36 python_prepare_all() {
37         # keeps trying to install this in tests
38         sed -i 's:path.py::' setup.py || die
39
40         distutils-r1_python_prepare_all
41 }
42
43 python_test() {
44         # at this point let's not fix python2 stuff
45         if ! python_is_python3; then
46                 ewarn "Tests broken on python2, not runninge tests for ${EPYTHON}"
47                 return 0
48         fi
49
50         distutils_install_for_testing
51
52         esetup.py test || die "Tests failed under ${EPYTHON}"
53 }