summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnavigator2019-09-27 17:13:29 +0200
committerbnavigator2019-09-27 17:13:29 +0200
commit79a61e3210429199afdf735e89dfa4f3550ebf79 (patch)
tree4cf8fab24b7ae94d27649e1359d59b1f6f4d8664
downloadaur-79a61e3210429199afdf735e89dfa4f3550ebf79.tar.gz
PKGBUILD with split definition for python2 and python3 packages.
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD68
2 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c16ea50e220
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = python-slycot
+ pkgdesc = Python wrapper for selected SLICOT routines, notably including solvers for Riccati, Lyapunov and Sylvester equations.
+ pkgver = 0.3.5.0
+ pkgrel = 1
+ url = http://github.com/python-control/Slycot
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ makedepends = cmake
+ makedepends = gcc-fortran
+ makedepends = lapack
+ makedepends = python-scikit-build>=0.8.1
+ makedepends = python2-scikit-build>=0.8.1
+ makedepends = python-nose
+ makedepends = python2-nose
+ makedepends = python-coverage
+ makedepends = python2-coverage
+ makedepends = python2-configparser
+ depends = python-numpy
+ depends = python2-numpy
+ provides = python-slycot
+ conflicts = python-slycot-git
+ source = https://files.pythonhosted.org/packages/source/s/slycot/slycot-0.3.5.0.tar.gz
+ sha256sums = cad98d5ea4f0a034cf398c39189f587620a0b03f1d4b71e77cd622a327f13adf
+
+pkgname = python-slycot
+ depends = python-numpy
+ conflicts = python-slycot-git
+
+pkgname = python2-slycot
+ depends = python2-numpy
+ conflicts = python2-slycot-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ec750de0563
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Ben Greiner <code-arch at bnavigator dot de>
+_name=slycot
+pkgname=("python-${_name}" "python2-${_name}")
+pkgver=0.3.5.0
+pkgrel=1
+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' 'python2-numpy')
+makedepends=('git' 'cmake' 'gcc-fortran' 'lapack'
+ 'python-scikit-build>=0.8.1'
+ 'python2-scikit-build>=0.8.1'
+ 'python-nose' 'python2-nose'
+ 'python-coverage' 'python2-coverage'
+ 'python2-configparser')
+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')
+
+prepare() {
+ cp -a ${_name}-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir/${_name}-${pkgver}"
+ python setup.py build -G "Unix Makefiles" -- -DF2PY_EXECUTABLE=/usr/bin/f2py3
+
+ cd "$srcdir/${_name}-${pkgver}-py2"
+ python2 setup.py build -G "Unix Makefiles" -- -DF2PY_EXECUTABLE=/usr/bin/f2py2
+}
+
+check() {
+ export PYTHONDONTWRITEBYTECODE=1
+
+ cd "$srcdir/${_name}-${pkgver}"
+ export PYTHONPATH="$PWD/_skbuild/linux-$CARCH-3.7/setuptools/lib"
+ python runtests.py --coverage --no-build
+
+ cd "$srcdir/${_name}-${pkgver}-py2"
+ export PYTHONPATH="$PWD/_skbuild/linux-$CARCH-2.7/setuptools/lib"
+ python2 runtests.py --coverage --no-build
+}
+
+package_python-slycot() {
+ 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"
+}
+
+package_python2-slycot() {
+ depends=('python2-numpy')
+ conflicts=('python2-slycot-git')
+
+ export LDFLAGS="$LDFLAGS -shared"
+
+ cd "$srcdir/${_name}-${pkgver}-py2"
+ python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build -G "Unix Makefiles"
+}
+
+# vim:set ts=2 sw=2 et: