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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jul 18 15:59:35 2010 UTC (10 years ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Delete older ebuild.

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.20.0.ebuild,v 1.4 2010/06/06 09:23:41 phajdan.jr Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="2"
7 SUPPORT_PYTHON_ABIS="1"
8
9 inherit distutils
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_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 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