blob: 2ea41b74aa4fc0460fd6b0430d05c3f25766a9c1 (
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
54
55
56
|
# Copyright 1999-2009 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.22 2009/10/02 01:03:39 arfrever Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
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 m68k mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE=""
DEPEND=""
RDEPEND=""
RESTRICT_PYTHON_ABIS="3.*"
S="${WORKDIR}/${MY_P}"
DOCS="CHANGES.txt"
src_prepare() {
epatch "${FILESDIR}/${P}-rename-package.patch"
}
src_test() {
testing() {
PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" "${S}/test/test_unittest.py"
}
python_execute_function testing
}
src_install() {
distutils_src_install
create_symlinks() {
insinto $(python_get_sitedir)/sancho-0
dosym $(python_get_sitedir)/sancho0 $(python_get_sitedir)/sancho-0/sancho
echo sancho-0 > "${D}$(python_get_sitedir)/sancho-0.pth"
}
python_execute_function -q create_symlinks
}
pkg_postinst() {
elog "This version of sancho is modified to allow parallel installation"
elog "with sancho-2.x. \"import sancho0\" will always give you this"
elog "version. \"import sancho\" will give you sancho 2.x if that is"
elog "installed, this version otherwise."
}
|