blob: 95af1cd482d1b34a92363a3381f0b5d3f9b51c3e (
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
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/pyamg/pyamg-2.0.4.ebuild,v 1.1 2012/04/23 18:21:05 bicatali Exp $
EAPI=4
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit distutils eutils
DESCRIPTION="Algebraic multigrid solvers in Python"
HOMEPAGE="http://code.google.com/p/pyamg/"
SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc test"
RESTRICT="test" # quite buggy
RDEPEND="sci-libs/scipy"
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
test? ( dev-python/nose )"
S="${WORKDIR}/${PN}"
src_compile() {
distutils_src_compile
if use doc; then
cd "${S}/Docs"
PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) emake html
fi
}
src_test() {
testing() {
"$(PYTHON)" setup.py \
build -b "build-${PYTHON_ABI}" \
install --home="${S}/test-${PYTHON_ABI}"
pushd "${S}/test-${PYTHON_ABI}/lib/python" > /dev/null
PYTHONPATH=. "$(PYTHON)" -c "import pyamg; pyamg.test()" 2>&1 | tee test.log
grep -Eq "^(ERROR|FAIL):" test.log && return 1
popd > /dev/null
rm -fr test-${PYTHON_ABI}
}
python_execute_function testing
}
src_install() {
distutils_src_install
use doc && dohtml -r Docs/build/html/*
}
|