blob: ee4bc391e1a13e3b07961872d352e1589d32b996 (
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
48
49
50
51
52
53
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/sancho/sancho-0.11-r1.ebuild,v 1.9 2006/05/14 21:22:34 tcort Exp $
inherit distutils eutils
MY_P=${P/s/S}
DESCRIPTION="Sancho is a unit testing framework"
HOMEPAGE="http://www.mems-exchange.org/software/sancho/"
SRC_URI="http://cheeseshop.python.org/packages/source/S/Sancho/${MY_P}.tar.gz"
LICENSE="CNRI"
SLOT="0.0"
KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd"
IUSE=""
DEPEND=">=dev-lang/python-2.2"
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-rename-package.patch"
}
src_test() {
mkdir "${T}/tests"
"${python}" setup.py install --home="${T}/tests" "$@" || die
pushd "${T}/tests"
PYTHONPATH=lib/python "${python}" "${S}/test/test_unittest.py" \
|| die "test failed"
popd
rm -rf "${T}/tests"
}
src_install() {
mydoc="CHANGES.txt README.txt"
distutils_src_install
python_version
insinto /usr/lib/python${PYVER}/site-packages/sancho-0
dosym /usr/lib/python${PYVER}/site-packages/sancho0 \
/usr/lib/python${PYVER}/site-packages/sancho-0/sancho
echo sancho-0 > "${D}/usr/lib/python${PYVER}/site-packages/sancho-0.pth"
}
pkg_postinst() {
einfo "This version of sancho is modified to allow parallel installation"
einfo "with sancho-2.x. \"import sancho0\" will always give you this"
einfo "version. \"import sancho\" will give you sancho 2.x if that is"
einfo "installed, this version otherwise."
}
|