blob: 844a4e908c5b7f26d0c95a4fa70efc5b6c261cc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/pylint/pylint-0.9.0.ebuild,v 1.2 2006/01/21 17:13:48 pylon Exp $
inherit distutils eutils
DESCRIPTION="PyLint is a tool to check if a Pyhon module satisfies a coding standard"
SRC_URI="ftp://ftp.logilab.org/pub/pylint/${P}.tar.gz"
HOMEPAGE="http://www.logilab.org/projects/pylint/"
IUSE=""
SLOT="0"
KEYWORDS="~ppc ~sparc ~x86"
LICENSE="GPL-2"
DEPEND="|| ( >=dev-python/optik-1.4 >=dev-lang/python-2.3 )
>=dev-python/logilab-common-0.13.0
>=dev-python/astng-0.14.0"
DOCS="doc/*.txt"
src_unpack() {
unpack ${A}
cd "${S}"
# these two tests do not pass (confirmed the first upstream,
# second is still being investigated) so remove them
for testname in func_use_for_or_listcomp_var.py func_format.py; do
mv test/input/${testname} test/input/${testname}.skipped ||
die "skipping ${testname} failed"
done
epatch "${FILESDIR}/${P}-extra-todo.patch"
}
src_install() {
distutils_src_install
# do not install the test suite (we ran it from src_test already
# and it makes .py[co] generation very noisy because there are
# files with SyntaxErrors in there)
python_version
rm -rf ${D}/usr/$(get_libdir)/python${PYVER}/site-packages/pylint/test
}
src_test() {
# The tests will not work properly from the source dir, so do a
# temporary install:
python_version
local spath="test/usr/$(get_libdir)/python${PYVER}/site-packages/"
${python} setup.py install --root="${T}/test" || die "test install failed"
# dir needs to be this or the tests fail
cd "${T}/${spath}/pylint/test"
PYTHONPATH="${T}/${spath}" "${python}" runtests.py || die "tests failed"
cd "${S}"
rm -rf "${T}/test"
}
|