blob: 8ebab0353a09d157caeb017bbdb12d4ac1a923f8 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Maintainer: Tyler Veness <calcmogul at gmail dot com>
pkgbase=python-control
pkgname=('python2-control' 'python-control')
pkgver=0.7.0
pkgrel=2
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=('python-setuptools' 'python2-setuptools')
checkdepends=('python-nose' 'python2-nose')
options=('staticlibs')
source=("https://github.com/python-control/python-control/archive/${pkgver}.tar.gz"
"LICENSE")
md5sums=('9ae5f99eb8e8ec242b108bbbcea0c990'
'5e21e2b8826c3345f50711d5634bc975')
prepare() {
cp -a python-control-$pkgver control-py2-$pkgver
cd control-py2-$pkgver
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 control-py2-$pkgver
python2 setup.py build
echo "Building Python3"
cd ../python-control-$pkgver
python setup.py build
}
check() {
cd python-control-$pkgver
python setup.py test
}
package_python2-control() {
_pyver=2.7
export LDFLAGS="$LDFLAGS -shared"
cd control-py2-$pkgver
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() {
provides=('python3-control')
_pyver=3.4
_pyinc=3.4m
export LDFLAGS="$LDFLAGS -shared"
cd python-control-$pkgver
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/"
}
|