diff options
author | Tyler Veness | 2018-04-03 11:55:05 -0700 |
---|---|---|
committer | Tyler Veness | 2018-04-03 21:18:45 -0700 |
commit | b4b7377d1c431e2a33761fb07dc9da7713541a81 (patch) | |
tree | ccf357f2382e104dabf91e2a624aa865caa61a1d /PKGBUILD | |
download | aur-b4b7377d1c431e2a33761fb07dc9da7713541a81.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3596c5e87f71 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,74 @@ +# Maintainer: Tyler Veness <calcmogul at gmail dot com> + +pkgbase=python-control-git +pkgname=('python2-control-git' 'python-control-git') +pkgver=662.601b581 +pkgrel=1 +pkgdesc="Implements basic operations for analysis and design of feedback control systems in Python" +arch=('any') +license=('BSD') +url="https://github.com/python-control/python-control" +depends=('python-scipy' + 'python-matplotlib') +optdepends=('python-slycot-git: matrix equation support, model simplification tools, and state feedback') +makedepends=('git' 'python-setuptools' 'python2-setuptools') +checkdepends=('python-nose' 'python2-nose' 'python-slycot-git') +options=('staticlibs') +source=("git+https://github.com/python-control/python-control.git" + "LICENSE") +md5sums=('SKIP' + '5e21e2b8826c3345f50711d5634bc975') + +pkgver() { + cd "$srcdir/python-control" + echo $(git rev-list --count master).$(git rev-parse --short master) +} + +prepare() { + cp -a python-control python2-control + cd python2-control + + sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \ + -i $(find . -name '*.py') +} + +build() { + export LDFLAGS="$LDFLAGS -shared" + + echo "Building Python2" + cd python2-control + python2 setup.py build + + echo "Building Python3" + cd ../python-control + python setup.py build +} + +check() { + cd python-control + python setup.py test +} + +package_python2-control-git() { + export LDFLAGS="$LDFLAGS -shared" + + cd python2-control + python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python2-control" + install -m644 ../LICENSE "${pkgdir}/usr/share/licenses/python2-control/" +} + +package_python-control-git() { + provides=('python3-control') + + export LDFLAGS="$LDFLAGS -shared" + + cd python-control + python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 + + install -m755 -d "${pkgdir}/usr/share/licenses/python-control" + install -m644 ../LICENSE "${pkgdir}/usr/share/licenses/python-control/" +} |