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

Diff of /dev-python/astng/astng-0.19.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/Attic/astng-0.19.0.ebuild,v 1.1 2009/06/19 13:08:17 idl0r Exp $ 3# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/Attic/astng-0.19.0.ebuild,v 1.2 2009/08/25 14:51:27 arfrever Exp $
4 4
5EAPI="2"
6SUPPORT_PYTHON_ABIS="1"
7
5inherit python distutils 8inherit distutils
6 9
7DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages" 10DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages"
8HOMEPAGE="http://www.logilab.org/projects/astng/" 11HOMEPAGE="http://www.logilab.org/projects/astng/"
9SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz" 12SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz"
10 13
15 18
16RDEPEND=">=dev-python/logilab-common-0.39.0" 19RDEPEND=">=dev-python/logilab-common-0.39.0"
17DEPEND="${RDEPEND} 20DEPEND="${RDEPEND}
18 test? ( >=dev-python/egenix-mx-base-3.0.0 )" 21 test? ( >=dev-python/egenix-mx-base-3.0.0 )"
19 22
23RESTRICT_PYTHON_ABIS="3*"
24
20PYTHON_MODNAME="logilab" 25PYTHON_MODNAME="logilab"
21 26
22S="${WORKDIR}/logilab-${P}" 27S="${WORKDIR}/logilab-${P}"
23 28
24src_test() { 29src_test() {
30 testing() {
25 local sdir="${T}/test/$(python_get_sitedir)" 31 local sdir="${T}/test/$(python_get_sitedir)"
26 32
27 # This is a hack to make tests work without installing to the live 33 # This is a hack to make tests work without installing to the live
28 # filesystem. We copy part of the logilab site-packages to a temporary 34 # filesystem. We copy part of the logilab site-packages to a temporary
29 # dir, install there, and run from there. 35 # dir, install there, and run from there.
30 mkdir -p "${sdir}/logilab" || die 36 mkdir -p "${sdir}/logilab" || die
31 cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" \ 37 cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" || die "copying logilab-common failed!"
32 || die "copying logilab-common failed!"
33 38
34 ${python} setup.py install --root="${T}/test" || die "test copy failed" 39 "$(PYTHON)" setup.py install --root="${T}/test" || die "test copy failed"
35 40
36 # Pytest picks up tests relative to the current dir, so cd in. 41 # Pytest picks up tests relative to the current dir, so cd in.
37 pushd "${sdir}/logilab/astng" >/dev/null || die 42 pushd "${sdir}/logilab/astng" > /dev/null || die
38 PYTHONPATH="${sdir}" pytest -v || die "tests failed" 43 PYTHONPATH="${sdir}" pytest -v || die "tests failed"
39 popd >/dev/null 44 popd > /dev/null
45 }
46 python_execute_function testing
40} 47}
41 48
42src_install() { 49src_install() {
43 local sdir="${D}/$(python_get_sitedir)/logilab"
44
45 distutils_src_install 50 distutils_src_install
46 51
47 # we need to remove this file because it collides with the one 52 deletion_of_unneeded_files() {
48 # from logilab-common (which we depend on). 53 local sdir="${D}/$(python_get_sitedir)/logilab"
49 # Bug 111970 and bug 223025
50 rm "${sdir}/__init__.py" || die
51 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 "${sdir}/__init__.py" || die
59
52 # Remove unittests since they're just needed during build-time 60 # Remove unittests since they're just needed during build-time
53 rm -rf "${sdir}/astng/test" || die 61 rm -rf "${sdir}/astng/test" || die
62 }
63 python_execute_function --action-message 'Deletion of unneeded files with Python ${PYTHON_ABI}' deletion_of_unneeded_files
54} 64}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20