| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/pyro/pyro-4.11.ebuild,v 1.6 2012/06/08 11:46:27 phajdan.jr Exp $
|
| 4 |
|
| 5 |
EAPI="3"
|
| 6 |
PYTHON_DEPEND="*:2.6"
|
| 7 |
SUPPORT_PYTHON_ABIS="1"
|
| 8 |
RESTRICT_PYTHON_ABIS="2.[45]"
|
| 9 |
|
| 10 |
inherit distutils
|
| 11 |
|
| 12 |
MY_PN="Pyro4"
|
| 13 |
MY_P="${MY_PN}-${PV}"
|
| 14 |
|
| 15 |
DESCRIPTION="Advanced and powerful Distributed Object Technology system written entirely in Python"
|
| 16 |
HOMEPAGE="http://www.xs4all.nl/~irmen/pyro/ http://pypi.python.org/pypi/Pyro4"
|
| 17 |
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
| 18 |
|
| 19 |
LICENSE="MIT"
|
| 20 |
SLOT="4"
|
| 21 |
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
|
| 22 |
IUSE="doc examples test"
|
| 23 |
|
| 24 |
RDEPEND="!dev-python/pyro:0"
|
| 25 |
DEPEND="${RDEPEND}
|
| 26 |
dev-python/setuptools
|
| 27 |
test? (
|
| 28 |
dev-python/coverage
|
| 29 |
dev-python/nose
|
| 30 |
)"
|
| 31 |
|
| 32 |
S="${WORKDIR}/${MY_P}"
|
| 33 |
|
| 34 |
PYTHON_MODNAME="Pyro4"
|
| 35 |
|
| 36 |
src_prepare() {
|
| 37 |
distutils_src_prepare
|
| 38 |
|
| 39 |
sed -e '/sys.path.insert/a sys.path.insert(1,"PyroTests")' -i tests/run_suite.py
|
| 40 |
|
| 41 |
# Disable tests requiring network connection.
|
| 42 |
sed \
|
| 43 |
-e "s/testBCstart/_&/" \
|
| 44 |
-e "s/testDaemonPyroObj/_&/" \
|
| 45 |
-e "s/testLookupAndRegister/_&/" \
|
| 46 |
-e "s/testMulti/_&/" \
|
| 47 |
-e "s/testRefuseDottedNames/_&/" \
|
| 48 |
-e "s/testResolve/_&/" \
|
| 49 |
-e "s/testBCLookup/_&/" \
|
| 50 |
-i tests/PyroTests/test_naming.py
|
| 51 |
sed \
|
| 52 |
-e "s/testOwnloopBasics/_&/" \
|
| 53 |
-e "s/testStartNSfunc/_&/" \
|
| 54 |
-i tests/PyroTests/test_naming2.py
|
| 55 |
|
| 56 |
sed \
|
| 57 |
-e "s/testServerConnections/_&/" \
|
| 58 |
-e "s/testServerParallelism/_&/" \
|
| 59 |
-i tests/PyroTests/test_server.py
|
| 60 |
|
| 61 |
sed \
|
| 62 |
-e "s/testBroadcast/_&/" \
|
| 63 |
-e "s/testGetIP/_&/" \
|
| 64 |
-i tests/PyroTests/test_socket.py
|
| 65 |
}
|
| 66 |
|
| 67 |
src_test() {
|
| 68 |
cd tests
|
| 69 |
|
| 70 |
testing() {
|
| 71 |
"$(PYTHON)" run_suite.py
|
| 72 |
}
|
| 73 |
python_execute_function testing
|
| 74 |
}
|
| 75 |
|
| 76 |
src_install() {
|
| 77 |
distutils_src_install
|
| 78 |
|
| 79 |
if use doc; then
|
| 80 |
dohtml -r docs/* || die "Installation of documentation failed"
|
| 81 |
fi
|
| 82 |
|
| 83 |
if use examples; then
|
| 84 |
insinto /usr/share/doc/${PF}
|
| 85 |
doins -r examples || die "Installation of examples failed"
|
| 86 |
fi
|
| 87 |
}
|