/[gentoo-x86]/dev-python/astng/astng-0.21.0.ebuild
Gentoo

Contents of /dev-python/astng/astng-0.21.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Dec 6 19:30:37 2010 UTC (9 years, 9 months ago) by arfrever
Branch: MAIN
Version bump.

(Portage version: 2.2.0_alpha7_p1/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="3"
6 SUPPORT_PYTHON_ABIS="1"
7
8 inherit distutils
9
10 DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages"
11 HOMEPAGE="http://www.logilab.org/projects/astng/ http://pypi.python.org/pypi/logilab-astng"
12 SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz mirror://pypi/l/logilab-astng/logilab-${P}.tar.gz"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x86-macos"
17 IUSE="test"
18
19 # Version specified in __pkginfo__.py.
20 RDEPEND=">=dev-python/logilab-common-0.53.0"
21 DEPEND="${RDEPEND}
22 dev-python/setuptools
23 test? ( >=dev-python/egenix-mx-base-3.0.0 )"
24
25 S="${WORKDIR}/logilab-${P}"
26
27 DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
28
29 PYTHON_MODNAME="logilab/astng"
30
31 src_prepare() {
32 distutils_src_prepare
33
34 conversion() {
35 [[ "${PYTHON_ABI}" == 2.* ]] && return
36 find -name "*.py" ! -name "setup.py" -print | xargs 2to3-${PYTHON_ABI} -nw --no-diffs
37 }
38 python_execute_function -s conversion
39 }
40
41 src_test() {
42 testing() {
43 local tpath="${T}/test-${PYTHON_ABI}"
44 local spath="${tpath}$(python_get_sitedir)"
45
46 mkdir -p "${spath}/logilab" || return 1
47 cp -r "$(python_get_sitedir)/logilab/common" "${spath}/logilab" || return 1
48
49 "$(PYTHON)" setup.py install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation) $(python_get_version)"
50
51 # pytest uses tests placed relatively to the current directory.
52 pushd "${spath}/logilab/astng" > /dev/null || return 1
53 PYTHONPATH="${spath}" pytest -v || return 1
54 popd > /dev/null || return 1
55 }
56 python_execute_function -s testing
57 }
58
59 src_install() {
60 distutils_src_install
61
62 deletion_of_unneeded_files() {
63 # Avoid collision with dev-python/logilab-common.
64 rm -f "${ED}$(python_get_sitedir)/logilab/__init__.py" || return 1
65
66 # Don't install tests.
67 rm -fr "${ED}$(python_get_sitedir)/logilab/astng/test" || return 1
68 }
69 python_execute_function -q deletion_of_unneeded_files
70 }

  ViewVC Help
Powered by ViewVC 1.1.20