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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Jun 19 13:08:17 2009 UTC (11 years, 4 months ago) by idl0r
Branch: MAIN
Version bump to 0.19.0. Fix src_test. Cleanup.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 idl0r 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: $
4    
5     inherit python distutils
6    
7     DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages"
8     HOMEPAGE="http://www.logilab.org/projects/astng/"
9     SRC_URI="ftp://ftp.logilab.org/pub/astng/logilab-${P}.tar.gz"
10    
11     LICENSE="GPL-2"
12     SLOT="0"
13     KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
14     IUSE="test"
15    
16     RDEPEND=">=dev-python/logilab-common-0.39.0"
17     DEPEND="${RDEPEND}
18     test? ( >=dev-python/egenix-mx-base-3.0.0 )"
19    
20     PYTHON_MODNAME="logilab"
21    
22     S="${WORKDIR}/logilab-${P}"
23    
24     src_test() {
25     local sdir="${T}/test/$(python_get_sitedir)"
26    
27     # 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
29     # dir, install there, and run from there.
30     mkdir -p "${sdir}/logilab" || die
31     cp -r "$(python_get_sitedir)/logilab/common" "${sdir}/logilab" \
32     || die "copying logilab-common failed!"
33    
34     ${python} setup.py install --root="${T}/test" || die "test copy failed"
35    
36     # Pytest picks up tests relative to the current dir, so cd in.
37     pushd "${sdir}/logilab/astng" >/dev/null || die
38     PYTHONPATH="${sdir}" pytest -v || die "tests failed"
39     popd >/dev/null
40     }
41    
42     src_install() {
43     local sdir="${D}/$(python_get_sitedir)/logilab"
44    
45     distutils_src_install
46    
47     # we need to remove this file because it collides with the one
48     # from logilab-common (which we depend on).
49     # Bug 111970 and bug 223025
50     rm "${sdir}/__init__.py" || die
51    
52     # Remove unittests since they're just needed during build-time
53     rm -rf "${sdir}/astng/test" || die
54     }

  ViewVC Help
Powered by ViewVC 1.1.20