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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Nov 14 18:50:05 2009 UTC (10 years, 10 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.17.0.ebuild,v 1.5 2007/06/24 20:35:14 dev-zero Exp $
4
5 NEED_PYTHON=2.1
6
7 inherit distutils eutils multilib
8
9 DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages"
10 SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz"
11 HOMEPAGE="http://www.logilab.org/projects/astng/"
12
13 IUSE=""
14 SLOT="0"
15 KEYWORDS="amd64 ~ia64 ppc ~ppc64 ~sparc x86"
16 LICENSE="GPL-2"
17
18 DEPEND=">=dev-python/logilab-common-0.13-r1"
19 RDEPEND="${DEPEND}"
20
21 S="${WORKDIR}/logilab-${P}"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26
27 # Skip a failing test.
28 epatch "${FILESDIR}/${PN}-0.16.1-skip-gobject-test.patch"
29
30 # Fix a typo (?)
31 epatch "${FILESDIR}/${P}-test-fixes.patch"
32 }
33
34 src_install() {
35 distutils_src_install
36 python_version
37 # we need to remove this file because it collides with the one
38 # from logilab-common (which we depend on).
39 rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/logilab/__init__.py"
40 }
41
42 src_test() {
43 python_version
44
45 # Do a temporary install.
46 local spath="usr/$(get_libdir)/python${PYVER}/site-packages/"
47
48 # This is a hack to make tests work without installing to the live
49 # filesystem. We copy part of the logilab site-packages to a temporary
50 # dir, install there, and run from there.
51 mkdir -p "${T}/test/${spath}/logilab"
52 cp -r "/${spath}/logilab/common" "${T}/test/${spath}/logilab" \
53 || die "copying logilab-common failed!"
54
55 "${python}" setup.py install --root="${T}/test" || die "test copy failed"
56
57 # Use a hacked up copy of pytest that exits nonzero on failure.
58 sed -e 's/exitafter=False/exitafter=True/' \
59 < "/usr/bin/pytest" > "${T}/pytest" || die "sed failed"
60
61 # Pytest picks up tests relative to the current dir, so cd in.
62 pushd "${T}/test/${spath}/logilab/astng" >/dev/null
63 PYTHONPATH="${T}/test/${spath}" "${python}" "${T}/pytest" -v \
64 || die "tests failed"
65 popd >/dev/null
66 rm -rf "${T}/test"
67 }

  ViewVC Help
Powered by ViewVC 1.1.20