Doug Anderson | 7a84e23 | 2011-02-04 15:23:00 -0800 | [diff] [blame] | 1 | # 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 | |
| 5 | EAPI="3" |
| 6 | PYTHON_DEPEND="*:2.5" |
| 7 | SUPPORT_PYTHON_ABIS="1" |
| 8 | RESTRICT_PYTHON_ABIS="2.4" |
| 9 | |
| 10 | inherit distutils |
| 11 | |
| 12 | DESCRIPTION="Python code static checker" |
| 13 | HOMEPAGE="http://www.logilab.org/projects/pylint/ http://pypi.python.org/pypi/pylint" |
| 14 | SRC_URI="ftp://ftp.logilab.org/pub/${PN}/${P}.tar.gz mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
| 15 | |
| 16 | LICENSE="GPL-2" |
| 17 | SLOT="0" |
| 18 | KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
| 19 | IUSE="examples" |
| 20 | |
| 21 | # Versions specified in __pkginfo__.py. |
| 22 | RDEPEND=">=dev-python/logilab-common-0.53.0 |
| 23 | >=dev-python/astng-0.21.1" |
| 24 | DEPEND="${RDEPEND} |
| 25 | dev-python/setuptools" |
| 26 | |
| 27 | DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" |
| 28 | DOCS="doc/*.txt" |
| 29 | |
| 30 | src_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 | |
| 40 | src_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 | |
| 56 | pkg_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 | } |