summaryrefslogtreecommitdiff
blob: 8d335543fd07b1add0513f1ec01fcdd248bf5ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/bzrtools/bzrtools-1.15.0.ebuild,v 1.5 2009/07/17 18:37:33 nixnut Exp $

EAPI="2"

NEED_PYTHON=2.4
inherit eutils distutils versionator

DESCRIPTION="bzrtools is a useful collection of utilities for bzr."
HOMEPAGE="http://bazaar-vcs.org/BzrTools"
SRC_URI="http://launchpad.net/bzrtools/stable/${PV}/+download/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~ia64 ppc sparc x86"
IUSE=""

DEPEND="=dev-util/bzr-$(get_version_component_range 1-2)*"
RDEPEND="${DEPEND}"

DOCS="AUTHORS CREDITS NEWS NEWS.Shelf README README.Shelf TODO TODO.heads TODO.Shelf"

S=${WORKDIR}/${PN}

PYTHON_MODNAME=bzrlib

src_prepare() {
	epatch "${FILESDIR}/${P}-test_fetch_ghosts.patch"
	distutils_src_prepare
}

src_test() {
	python_version
	einfo "Running testsuite..."
	# put a linked copy of the bzr core into the build directory to properly
	# test the "built" version of bzrtools
	find "$(python_get_libdir)/site-packages/bzrlib/" \
		-mindepth 1 -maxdepth 1 \
		\( \( -type d -and -not -name "plugins" \) -or -name "*.py" \) \
		-exec ln -s '{}' "${S}/build/lib/bzrlib/" \;
	touch "${S}/build/lib/bzrlib/plugins/__init__.py"
	"${S}/test.py" "${S}/build/lib" || die "Testsuite failed."
	# remove the "shadow" copy so it doesn't get installed
	rm "${S}/build/lib/bzrlib/plugins/__init__.py"
	find "${S}/build/lib/bzrlib/" -mindepth 1 -maxdepth 1 -type l -exec rm '{}' \;
}