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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Jan 17 22:52:27 2011 UTC (9 years, 8 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +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.20.1.ebuild,v 1.5 2010/07/18 14:06:29 nixnut Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.*"
9
10 inherit distutils
11
12 DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages"
13 HOMEPAGE="http://www.logilab.org/projects/astng/ http://pypi.python.org/pypi/logilab-astng"
14 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"
15
16 LICENSE="LGPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ~ia64 ppc ~ppc64 ~sparc x86 ~x64-macos ~x86-macos"
19 IUSE="test"
20
21 # Version specified in __pkginfo__.py.
22 RDEPEND=">=dev-python/logilab-common-0.49.0"
23 DEPEND="${RDEPEND}
24 test? ( >=dev-python/egenix-mx-base-3.0.0 )"
25
26 S="${WORKDIR}/logilab-${P}"
27
28 PYTHON_MODNAME="logilab/astng"
29
30 src_test() {
31 testing() {
32 local sdir="${T}/test/$(python_get_sitedir)"
33
34 # This is a hack to make tests work without installing to the live
35 # filesystem. We copy part of the logilab site-packages to a temporary
36 # dir, install there, and run from there.
37 mkdir -p "${sdir}/logilab" || die
38 cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" || die "copying logilab-common failed!"
39
40 "$(PYTHON)" setup.py install --root="${T}/test" || die "test copy failed"
41
42 # Pytest picks up tests relative to the current dir, so cd in.
43 pushd "${sdir}/logilab/astng" > /dev/null || die
44 PYTHONPATH="${sdir}" pytest -v || die "tests failed"
45 popd > /dev/null
46 }
47 python_execute_function testing
48 }
49
50 src_install() {
51 distutils_src_install
52
53 deletion_of_unneeded_files() {
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 -q deletion_of_unneeded_files
65 }

  ViewVC Help
Powered by ViewVC 1.1.20