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