blob: 3fb4fdc2ad1c4bcb218873dee1bcf6b0cb612f46 [file] [log] [blame]
Doug Anderson7a84e232011-02-04 15:23:00 -08001# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-python/pylint/pylint-0.23.0.ebuild,v 1.1 2011/01/18 18:11:20 arfrever Exp $
4
5EAPI="3"
6PYTHON_DEPEND="*:2.5"
7SUPPORT_PYTHON_ABIS="1"
8RESTRICT_PYTHON_ABIS="2.4"
9
10inherit distutils
11
12DESCRIPTION="Python code static checker"
13HOMEPAGE="http://www.logilab.org/projects/pylint/ http://pypi.python.org/pypi/pylint"
14SRC_URI="ftp://ftp.logilab.org/pub/${PN}/${P}.tar.gz mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15
16LICENSE="GPL-2"
17SLOT="0"
18KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
19IUSE="examples"
20
21# Versions specified in __pkginfo__.py.
22RDEPEND=">=dev-python/logilab-common-0.53.0
23 >=dev-python/astng-0.21.1"
24DEPEND="${RDEPEND}
25 dev-python/setuptools"
26
27DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
28DOCS="doc/*.txt"
29
30src_test() {
31 testing() {
32 # Test suite broken with Python 3.
33 [[ "${PYTHON_ABI}" == 3.* ]] && return
34
35 PYTHONPATH="build/lib" pytest -v
36 }
37 python_execute_function -s testing
38}
39
40src_install() {
41 distutils_src_install
42
43 doman man/{pylint,pyreverse}.1 || die "doman failed"
44
45 if use examples; then
46 docinto examples
47 dodoc examples/* || die "dodoc failed"
48 fi
49
50 delete_tests() {
51 rm -fr "${ED}$(python_get_sitedir)/pylint/test"
52 }
53 python_execute_function -q delete_tests
54}
55
56pkg_postinst() {
57 distutils_pkg_postinst
58
59 # Optional dependency on "tk" USE flag would break support for Jython.
60 elog "pylint-gui script requires dev-lang/python with \"tk\" USE flag enabled."
61}