1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
10 DESCRIPTION="Automatically find diff lines that need test coverage"
11 HOMEPAGE="https://github.com/Bachmann1234/diff-cover"
12 SRC_URI="https://github.com/Bachmann1234/diff-cover/archive/v${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
18 RESTRICT="!test? ( test )"
20 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
21 >=dev-python/jinja-2.7.1[${PYTHON_USEDEP}]
22 dev-python/jinja2_pluralize[${PYTHON_USEDEP}]
23 dev-python/pygments[${PYTHON_USEDEP}]
24 dev-python/six[${PYTHON_USEDEP}]"
27 dev-python/coverage[${PYTHON_USEDEP}]
28 dev-python/flake8[${PYTHON_USEDEP}]
29 dev-python/mock[${PYTHON_USEDEP}]
30 dev-python/nose[${PYTHON_USEDEP}]
31 >=dev-python/pycodestyle-2.4.0[${PYTHON_USEDEP}]
32 dev-python/pyflakes[${PYTHON_USEDEP}]
36 S=${WORKDIR}/${MY_PN}-${PV}
38 python_prepare_all() {
39 # TypeError: test_parse_range_notation() takes exactly 2 arguments (1 given)
40 sed -e 's|test_parse_range_notation|_\0|' \
41 -i "${MY_PN}/tests/test_diff_cover_main.py" || die
43 distutils-r1_python_prepare_all
47 esetup.py test || die "tests failed with ${EPYTHON}"