*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / flake8 / flake8-2.2.5.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="A wrapper around PyFlakes, pep8 & mccabe"
11 HOMEPAGE="https://bitbucket.org/tarek/flake8 https://pypi.org/project/flake8/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
15 IUSE="test"
16 RESTRICT="!test? ( test )"
17 LICENSE="MIT"
18 SLOT="0"
19
20 # requires.txt inc. mccabe however that creates a circular dep
21 RDEPEND=">=dev-python/pyflakes-0.7.3[${PYTHON_USEDEP}]
22         >=dev-python/pep8-1.5.7[${PYTHON_USEDEP}]"
23 PDEPEND=">=dev-python/mccabe-0.2.1[${PYTHON_USEDEP}]"
24 DEPEND="${RDEPEND}
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         test? ( ${PDEPEND}
27                 dev-python/nose[${PYTHON_USEDEP}]
28                 dev-python/mock[${PYTHON_USEDEP}] )"
29
30 python_prepare_all() {
31         # This tests requires / assumes this version is already installed.
32         sed -e 's:test_register_extensions:_&:' -i flake8/tests/test_engine.py || die
33         distutils-r1_python_prepare_all
34 }
35
36 python_test() {
37         esetup.py test
38 }