summaryrefslogtreecommitdiff
blob: f814a6a89c3fab671c1fe81fb6477b7d4977d09d (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/lp_solve/lp_solve-5.5.2.0.ebuild,v 1.2 2012/02/22 10:04:48 patrick Exp $

EAPI=4

SUPPORT_PYTHON_ABIS=1
RESTRICT_PYTHON_ABIS="2.4 3* 2.7-pypy-* *-jython"

inherit distutils eutils

DESCRIPTION="Python wrappers for lpsolve"
HOMEPAGE="http://lpsolve.sourceforge.net/5.5/Python.htm"
SRC_URI="mirror://sourceforge/lpsolve/${PN}_${PV}_Python_source.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"

RDEPEND="dev-python/numpy
	sci-mathematics/lpsolve"
DEPEND="${RDEPEND}
	dev-python/setuptools"

S="${WORKDIR}/${PN}_5.5/extra/Python/"

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

src_test() {
	testing() {
		PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" \
		"$(PYTHON)" lpdemo.py
	}
	python_execute_function testing
}

src_install() {
	distutils_src_install
	dodoc changes
	use doc && dohtml Python.htm
	insinto /usr/share/doc/${PF}/examples
	use examples && doins ex*py
}