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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Sep 4 22:34:41 2009 UTC (11 years ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump.
(Portage version: 14182-svn/cvs/Linux x86_64)

1 # Copyright 1999-2008 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.2.ebuild,v 1.1 2008/02/28 20:37:47 dev-zero Exp $
4
5 NEED_PYTHON="2.3"
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 IUSE=""
13 SLOT="0"
14 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
15 LICENSE="GPL-2"
16
17 DEPEND=">=dev-python/logilab-common-0.13-r1"
18 RDEPEND="${DEPEND}"
19
20 S="${WORKDIR}/logilab-${P}"
21
22 src_unpack() {
23 unpack ${A}
24 cd "${S}"
25
26 # Skip a failing test.
27 epatch "${FILESDIR}/${PN}-0.16.1-skip-gobject-test.patch"
28 }
29
30 src_install() {
31 distutils_src_install
32 python_version
33 # we need to remove this file because it collides with the one
34 # from logilab-common (which we depend on).
35 rm "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/logilab/__init__.py"
36 }
37
38 src_test() {
39 python_version
40
41 # Do a temporary install.
42 local spath="usr/$(get_libdir)/python${PYVER}/site-packages/"
43
44 # This is a hack to make tests work without installing to the live
45 # filesystem. We copy part of the logilab site-packages to a temporary
46 # dir, install there, and run from there.
47 mkdir -p "${T}/test/${spath}/logilab"
48 cp -r "/${spath}/logilab/common" "${T}/test/${spath}/logilab" \
49 || die "copying logilab-common failed!"
50
51 "${python}" setup.py install --root="${T}/test" || die "test copy failed"
52
53 # Use a hacked up copy of pytest that exits nonzero on failure.
54 sed -e 's/exitafter=False/exitafter=True/' \
55 < "/usr/bin/pytest" > "${T}/pytest" || die "sed failed"
56
57 # Pytest picks up tests relative to the current dir, so cd in.
58 pushd "${T}/test/${spath}/logilab/astng" >/dev/null
59 PYTHONPATH="${T}/test/${spath}" "${python}" "${T}/pytest" -v \
60 || die "tests failed"
61 popd >/dev/null
62 rm -rf "${T}/test"
63 }

  ViewVC Help
Powered by ViewVC 1.1.20