Date: Saturday, May 6, 2023 @ 17:23:17
  Author: arojas
Revision: 1459061

New sagemath dependency

Added:
  python-ecos/
  python-ecos/trunk/
  python-ecos/trunk/PKGBUILD
  python-ecos/trunk/unbundle-ecos.patch

---------------------+
 PKGBUILD            |   40 ++++++++++++++++++++++++++++++++++++++++
 unbundle-ecos.patch |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

Added: python-ecos/trunk/PKGBUILD
===================================================================
--- python-ecos/trunk/PKGBUILD                          (rev 0)
+++ python-ecos/trunk/PKGBUILD  2023-05-06 17:23:17 UTC (rev 1459061)
@@ -0,0 +1,40 @@
+# Maintainer: Antonio Rojas <[email protected]>
+# Contributor: Guillaume Horel <[email protected]>
+
+_pyname=ecos-python
+pkgname=python-ecos
+pkgver=2.0.11
+pkgrel=2
+pkgdesc='Python interface for ECOS'
+url='https://github.com/embotech/ecos-python'
+depends=(python-scipy ecos)
+makedepends=(python-build python-installer python-wheel)
+checkdepends=(python-nose python-pytest)
+license=(GPL3)
+arch=(x86_64)
+source=(https://github.com/embotech/ecos-python/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+        unbundle-ecos.patch)
+sha256sums=('01ebd3fc8a54822e035c5d69f750fc577001754a057a6a023b68e736c43a7823'
+            'c929cbe71cf8a109a66cbc681c6c501c42517b44e63f88440c36e5c7ca9e3be9')
+
+prepare() {
+  cd $_pyname-$pkgver
+  patch -p1 -i ../unbundle-ecos.patch
+}
+
+build() {
+  cd $_pyname-$pkgver
+  python -m build --wheel --no-isolation --skip-dependency-check
+}
+
+check() {
+  cd $_pyname-$pkgver
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m installer dist/*.whl
+  test-env/bin/python -m pytest -v
+}
+
+package() {
+  cd $_pyname-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+}

Added: python-ecos/trunk/unbundle-ecos.patch
===================================================================
--- python-ecos/trunk/unbundle-ecos.patch                               (rev 0)
+++ python-ecos/trunk/unbundle-ecos.patch       2023-05-06 17:23:17 UTC (rev 
1459061)
@@ -0,0 +1,40 @@
+diff -urN ecos-python-2.0.7rc2-orig/setup.py ecos-python-2.0.7rc2/setup.py
+--- ecos-python-2.0.7rc2-orig/setup.py 2018-05-23 22:16:42.967677526 -0400
++++ ecos-python-2.0.7rc2/setup.py      2018-05-23 22:17:41.981221901 -0400
+@@ -9,7 +9,7 @@
+ from glob import glob
+ from platform import system
+ 
+-lib = []
++lib = ['ecos']
+ if system() == 'Linux':
+     lib += ['rt']
+ 
+@@ -21,25 +21,8 @@
+                         ('DLONG', None),
+                         ('LDL_LONG', None),
+                         ('CTRLC', 1)],
+-                    include_dirs = ['ecos/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'],
++                    sources = ['src/ecosmodule.c'])
+ 
+ def set_builtin(name, value):
+     if isinstance(__builtins__, dict):

Reply via email to