summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Veness2018-04-03 11:55:05 -0700
committerTyler Veness2018-04-03 21:18:45 -0700
commitb4b7377d1c431e2a33761fb07dc9da7713541a81 (patch)
treeccf357f2382e104dabf91e2a624aa865caa61a1d
downloadaur-b4b7377d1c431e2a33761fb07dc9da7713541a81.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--LICENSE10
-rw-r--r--PKGBUILD74
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..071fb29c07af
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = python-control-git
+ pkgdesc = Implements basic operations for analysis and design of feedback control systems in Python
+ pkgver = 662.601b581
+ pkgrel = 1
+ url = https://github.com/python-control/python-control
+ arch = any
+ license = BSD
+ checkdepends = python-nose
+ checkdepends = python2-nose
+ checkdepends = python-slycot-git
+ makedepends = git
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ depends = python-scipy
+ depends = python-matplotlib
+ optdepends = python-slycot-git: matrix equation support, model simplification tools, and state feedback
+ options = staticlibs
+ source = git+https://github.com/python-control/python-control.git
+ source = LICENSE
+ md5sums = SKIP
+ md5sums = 5e21e2b8826c3345f50711d5634bc975
+
+pkgname = python2-control-git
+
+pkgname = python-control-git
+ provides = python3-control
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..44b4bc6ba66a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,10 @@
+Copyright (c) 2009, Richard Murray and Scott C. Livingston
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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/"
+}