aboutsummaryrefslogtreecommitdiff
blob: 877eb00e61e9534808c35f8fa3eb66541886fb6b (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-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"

inherit distutils eutils

DESCRIPTION="Sparse linear algebra extension for Python"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
HOMEPAGE="http://pysparse.sourceforge.net/"

IUSE="doc examples"
SLOT="0"
KEYWORDS="~amd64 ~x86"
LICENSE="BSD"

RDEPEND="
	dev-python/numpy
	sci-libs/superlu
	<=sci-libs/umfpack-5.4.0"
DEPEND="${DEPEND}"

RESTRICT_PYTHON_ABIS="3.*"

src_prepare() {
	epatch "${FILESDIR}"/${P}-setup.patch
	epatch "${FILESDIR}"/${P}-superlu3.patch
}

src_test() {
	testing() {
		for t in Test/test{Umfpack,Superlu}.py; do
			PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" ${t}
		done
	}
	python_execute_function testing
}

src_install() {
	distutils_src_install
	if use doc; then
		insinto /usr/share/doc/${PF}
		doins Doc/*.pdf || die
	fi
	if use examples; then
		insinto /usr/share/doc/${PF}/examples
		doins Examples/* || die
	fi
}