diff options
author | Guillaume Horel | 2017-01-20 10:54:53 -0500 |
---|---|---|
committer | Guillaume Horel | 2017-01-20 10:55:19 -0500 |
commit | 2da083ab235dc33ffffd55ce78a1fe9417bd32d9 (patch) | |
tree | eca987f646811339ae4e32f612d140d74d1b56f4 | |
download | aur-2da083ab235dc33ffffd55ce78a1fe9417bd32d9.tar.gz |
initial import
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | use_external_ecos.patch | 39 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..154dccff4b8b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = python-ecos + pkgdesc = Python interface for ECOS. + pkgver = 2.0.4 + pkgrel = 1 + url = https://github.com/embotech/ecos-python + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = python-setuptools + depends = python + depends = python-numpy + depends = python-scipy + depends = ecos + source = https://github.com/embotech/ecos-python/archive/v2.0.4.tar.gz + source = use_external_ecos.patch + sha256sums = d16907b0e9f41bbe7f43c37562e0d361db1f4d2e5fc7e91125899b4fdd062790 + sha256sums = 49303c5fe700ccdc06fabdab87e5a0518b495fe32a99b2062f301e15dc4a0c72 + +pkgname = python-ecos + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..91ea8d3f9941 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Guillaume Horel <guillaume.horel@gmail.com> +pkgbase=('python-ecos') +pkgname=('python-ecos') +_module='ecos-python' +pkgver='2.0.4' +pkgrel=1 +pkgdesc="Python interface for ECOS." +url="https://github.com/embotech/ecos-python" +depends=('python' + 'python-numpy' + 'python-scipy' + 'ecos') +makedepends=('python-setuptools') +license=('GPL3') +arch=('i686' 'x86_64') +source=("https://github.com/embotech/ecos-python/archive/v${pkgver}.tar.gz" + "use_external_ecos.patch") +sha256sums=('d16907b0e9f41bbe7f43c37562e0d361db1f4d2e5fc7e91125899b4fdd062790' + '49303c5fe700ccdc06fabdab87e5a0518b495fe32a99b2062f301e15dc4a0c72') + +prepare() { + cd "${srcdir}/${_module}-${pkgver}" + patch -p1 < ../use_external_ecos.patch +} + +build() { + cd "${srcdir}/${_module}-${pkgver}" + python setup.py build +} + +package() { + cd "${srcdir}/${_module}-${pkgver}" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build +} diff --git a/use_external_ecos.patch b/use_external_ecos.patch new file mode 100644 index 000000000000..34e2e916338c --- /dev/null +++ b/use_external_ecos.patch @@ -0,0 +1,39 @@ +--- ecos-python-2.0.4-orig/setup.py 2015-09-10 11:33:19.000000000 -0400 ++++ ecos-python-2.0.4/setup.py 2017-01-20 10:35:13.330569455 -0500 +@@ -9,7 +9,7 @@ + from platform import system + import numpy + +-lib = [] ++lib = ['ecos'] + if system() == 'Linux': + lib += ['rt'] + +@@ -21,25 +21,8 @@ + ('DLONG', None), + ('LDL_LONG', None), + ('CTRLC', 1)], +- include_dirs = ['ecos/include', numpy.get_include(), +- 'ecos/external/amd/include', +- 'ecos/external/ldl/include', +- 'ecos/external/SuiteSparse_config'], +- sources = ['src/ecosmodule.c', +- 'ecos/external/ldl/src/ldl.c', +- 'ecos/src/cone.c', +- 'ecos/src/ctrlc.c', +- 'ecos/src/ecos.c', +- 'ecos/src/equil.c', +- 'ecos/src/expcone.c', +- 'ecos/src/kkt.c', +- 'ecos/src/preproc.c', +- 'ecos/src/spla.c', +- 'ecos/src/splamm.c', +- 'ecos/src/timer.c', +- 'ecos/src/wright_omega.c' +- ] + glob('ecos/external/amd/src/*.c') +- + glob('ecos/ecos_bb/*.c')) # glob bb source files ++ include_dirs = ['/usr/include/ecos/', numpy.get_include()], ++ sources = ['src/ecosmodule.c']) + + setup( + name = 'ecos', |