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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Jun 9 12:50:55 2010 UTC (10 years, 1 month ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

1 # Copyright 1999-2009 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.19.1.ebuild,v 1.5 2009/10/24 18:39:20 arfrever Exp $
4
5 EAPI="2"
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/"
12 SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 ~ia64 ppc ~ppc64 ~sparc x86 ~x86-macos"
17 IUSE="test"
18
19 RDEPEND=">=dev-python/logilab-common-0.39.0"
20 DEPEND="${RDEPEND}
21 test? ( >=dev-python/egenix-mx-base-3.0.0 )"
22
23 RESTRICT_PYTHON_ABIS="3*"
24
25 PYTHON_MODNAME="logilab"
26
27 S="${WORKDIR}/logilab-${P}"
28
29 src_test() {
30 testing() {
31 local sdir="${T}/test/$(python_get_sitedir)"
32
33 # This is a hack to make tests work without installing to the live
34 # filesystem. We copy part of the logilab site-packages to a temporary
35 # dir, install there, and run from there.
36 mkdir -p "${sdir}/logilab" || die
37 cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" || die "copying logilab-common failed!"
38
39 "$(PYTHON)" setup.py install --root="${T}/test" || die "test copy failed"
40
41 # Pytest picks up tests relative to the current dir, so cd in.
42 pushd "${sdir}/logilab/astng" > /dev/null || die
43 PYTHONPATH="${sdir}" pytest -v || die "tests failed"
44 popd > /dev/null
45 }
46 python_execute_function testing
47 }
48
49 src_install() {
50 distutils_src_install
51
52 deletion_of_unneeded_files() {
53 [[ -z ${ED} ]] && local ED=${D}
54 local sdir="${ED}$(python_get_sitedir)/logilab"
55
56 # we need to remove this file because it collides with the one
57 # from logilab-common (which we depend on).
58 # Bug 111970 and bug 223025
59 rm -f "${sdir}/__init__.py" || die
60
61 # Remove unittests since they're just needed during build-time
62 rm -fr "${sdir}/astng/test" || die
63 }
64 python_execute_function --action-message 'Deletion of unneeded files with Python ${PYTHON_ABI}' deletion_of_unneeded_files
65 }

  ViewVC Help
Powered by ViewVC 1.1.20