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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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

  ViewVC Help
Powered by ViewVC 1.1.20