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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu May 13 18:17:44 2010 UTC (10 years, 2 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Delete older ebuild.

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.3.ebuild,v 1.1 2009/12/19 17:38:00 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/ http://pypi.python.org/pypi/logilab-astng"
12 SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz http://pypi.python.org/packages/source/l/logilab-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 RESTRICT_PYTHON_ABIS="3.*"
23
24 S="${WORKDIR}/logilab-${P}"
25
26 PYTHON_MODNAME="logilab/astng"
27
28 src_test() {
29 testing() {
30 local sdir="${T}/test/$(python_get_sitedir)"
31
32 # This is a hack to make tests work without installing to the live
33 # filesystem. We copy part of the logilab site-packages to a temporary
34 # dir, install there, and run from there.
35 mkdir -p "${sdir}/logilab" || die
36 cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" || die "copying logilab-common failed!"
37
38 "$(PYTHON)" setup.py install --root="${T}/test" || die "test copy failed"
39
40 # Pytest picks up tests relative to the current dir, so cd in.
41 pushd "${sdir}/logilab/astng" > /dev/null || die
42 PYTHONPATH="${sdir}" pytest -v || die "tests failed"
43 popd > /dev/null
44 }
45 python_execute_function testing
46 }
47
48 src_install() {
49 distutils_src_install
50
51 deletion_of_unneeded_files() {
52 [[ -z "${ED}" ]] && local ED="${D}"
53 local sdir="${ED}$(python_get_sitedir)/logilab"
54
55 # we need to remove this file because it collides with the one
56 # from logilab-common (which we depend on).
57 # Bug 111970 and bug 223025
58 rm -f "${sdir}/__init__.py" || die
59
60 # Remove unittests since they're just needed during build-time
61 rm -fr "${sdir}/astng/test" || die
62 }
63 python_execute_function --action-message 'Deletion of unneeded files with Python ${PYTHON_ABI}' deletion_of_unneeded_files
64 }

  ViewVC Help
Powered by ViewVC 1.1.20