summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4086dd766b2210d9ecc2ebb4601037ac62611058 (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
_name=slycot
pkgname="python-${_name}"
pkgver=0.3.5.0
pkgrel=2
pkgdesc="Python wrapper for selected SLICOT routines, notably including solvers for Riccati, Lyapunov and Sylvester equations."
arch=('i686' 'x86_64')
url="http://github.com/python-control/Slycot"
license=('GPL2')
depends=('python-numpy')
makedepends=('git' 'cmake' 'gcc-fortran' 'lapack'
             'python-scikit-build>=0.8.1'
             'python-nose'
             'python-coverage')
opts=(!strip)
optdepends=()
provides=('python-slycot')
conflicts=('python-slycot-git')
source=(https://files.pythonhosted.org/packages/source/s/$_name/$_name-$pkgver.tar.gz)
sha256sums=('cad98d5ea4f0a034cf398c39189f587620a0b03f1d4b71e77cd622a327f13adf')

build() {
  cd "$srcdir/${_name}-${pkgver}"
  python setup.py build -G "Unix Makefiles" -- -DF2PY_EXECUTABLE=/usr/bin/f2py3
}

check() {
  export PYTHONDONTWRITEBYTECODE=1 

  cd "$srcdir/${_name}-${pkgver}"
  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
  export PYTHONPATH="$PWD/_skbuild/linux-$CARCH-${python_version}/setuptools/lib"
  python runtests.py --coverage --no-build
}

package() {
  depends=('python-numpy')
  conflicts=('python-slycot-git')

  export LDFLAGS="$LDFLAGS -shared"

  cd "$srcdir/${_name}-${pkgver}"
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build -G "Unix Makefiles"
}

# vim:set ts=2 sw=2 et: