summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 190f84acab1d2348813e622a915ee30bfdfeeb96 (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
# Maintainer: Maximilian Stahlberg <maximilian.stahlberg tu-berlin de>

pkgname=python-swiglpk
pkgver=4.65.1
pkgrel=4
pkgdesc='A Python interface to the GLPK optimization solver.'
arch=('any')
url='https://github.com/biosustain/swiglpk'
license=('GPL3')
depends=('python' 'glpk')
makedepends=('swig' 'python-setuptools')
conflicts=('python-swiglpk-git')
source=("https://github.com/biosustain/swiglpk/archive/${pkgver}.tar.gz")
md5sums=('1870f23fb67b60263ef1f7b343ab657b')

prepare() {
	cd "${srcdir}/swiglpk-${pkgver}"

	# Work around https://github.com/biosustain/swiglpk/issues/40.
	cp /usr/include/glpk.h .
}

build() {
	cd "${srcdir}/swiglpk-${pkgver}"
	python setup.py build
}

check() {
	cd "${srcdir}/swiglpk-${pkgver}/build/lib."*
	python -Bc "import swiglpk"
}

package() {
	cd "${srcdir}/swiglpk-${pkgver}"
	python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}