summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2019-12-04 19:47:22 +0100
committerMichel Zou2019-12-04 19:47:22 +0100
commit72d17fc0205565e95e78b986e680df295628135e (patch)
treebae1034bd05e8acd3ca8636bb23274c9fc32e450
parentdde1cdad235d715ef5769f51359edc64445fd266 (diff)
downloadaur-72d17fc0205565e95e78b986e680df295628135e.tar.gz
3.1
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD19
-rw-r--r--sundials4.patch48
-rw-r--r--sundials5.patch60
4 files changed, 72 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fceee13efd0d..585fbf345903 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-assimulo
pkgdesc = A package for solving ordinary differential equations and differential algebraic equations
- pkgver = 3.0
+ pkgver = 3.1
pkgrel = 1
url = http://www.jmodelica.org/assimulo
arch = i686
@@ -15,14 +15,10 @@ pkgbase = python-assimulo
depends = python-matplotlib
depends = lapack
depends = sundials
- source = https://github.com/modelon/Assimulo/archive/Assimulo-3.0.tar.gz
- source = sundials4.patch
- sha256sums = 6a1437af8ea0c9af3c0afa1efb44f5d1e11edfec1250ce3510f9e33397a04e6b
+ source = Assimulo-3.1::svn+https://svn.jmodelica.org/assimulo/tags/Assimulo-3.1
+ source = sundials5.patch
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = python-assimulo
- depends = python-scipy
- depends = python-matplotlib
- depends = lapack
- depends = sundials
diff --git a/PKGBUILD b/PKGBUILD
index f7ee34f85b81..91ffa878596f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=python-assimulo
-pkgver=3.0
+pkgver=3.1
pkgrel=1
pkgdesc="A package for solving ordinary differential equations and differential algebraic equations"
url="http://www.jmodelica.org/assimulo"
@@ -7,28 +7,25 @@ arch=('i686' 'x86_64')
license=('LGPL')
makedepends=('python-setuptools' 'cython' 'gcc-fortran' 'sundials' 'lapack')
depends=('python-scipy' 'python-matplotlib' 'lapack' 'sundials')
-source=("https://github.com/modelon/Assimulo/archive/Assimulo-${pkgver}.tar.gz" sundials4.patch)
-sha256sums=('6a1437af8ea0c9af3c0afa1efb44f5d1e11edfec1250ce3510f9e33397a04e6b'
- 'SKIP')
+source=("Assimulo-${pkgver}::svn+https://svn.jmodelica.org/assimulo/tags/Assimulo-${pkgver}" sundials5.patch)
+sha256sums=('SKIP' 'SKIP')
prepare() {
- cd "${srcdir}"/Assimulo-Assimulo-$pkgver
+ cd "${srcdir}"/Assimulo-$pkgver
- # try to build with sundials 4.0
- patch -p0 -i "${srcdir}"/sundials4.patch
+ # try to build with sundials 5.0
+ patch -p0 -i "${srcdir}"/sundials5.patch
# use shared lib
sed -i "s|BLASname_t+'.a'|BLASname_t+'.so'|g" setup.py
}
build() {
- cp -r "${srcdir}"/Assimulo-Assimulo-$pkgver "${srcdir}"/Assimulo-Assimulo-$pkgver-py2
+ cp -r "${srcdir}"/Assimulo-$pkgver "${srcdir}"/Assimulo-Assimulo-$pkgver-py2
}
package() {
- depends=('python-scipy' 'python-matplotlib' 'lapack' 'sundials')
-
- cd "${srcdir}/Assimulo-Assimulo-$pkgver"
+ cd "${srcdir}"/Assimulo-$pkgver
python setup.py install --root=${pkgdir} --optimize=1 --extra-fortran-link-flags="-shared" --sundials-home=/usr --blas-home=/usr/lib --blas-name="blas" --lapack-home=/usr
}
diff --git a/sundials4.patch b/sundials4.patch
deleted file mode 100644
index 754bde37026f..000000000000
--- a/sundials4.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Index: setup.py
-===================================================================
---- setup.py (revision 875)
-+++ setup.py (working copy)
-@@ -426,7 +426,7 @@
- ext_list[-1].library_dirs = [self.libdirs]
-
- if self.SUNDIALS_version >= (3,0,0):
-- ext_list[-1].libraries = ["sundials_cvodes", "sundials_nvecserial", "sundials_idas", "sundials_sunlinsoldense", "sundials_sunlinsolspgmr", "sundials_sunmatrixdense", "sundials_sunmatrixsparse"]
-+ ext_list[-1].libraries = ["sundials_cvodes", "sundials_nvecserial", "sundials_idas", "sundials_sunlinsoldense", "sundials_sunlinsolspgmr", "sundials_sunmatrixdense", "sundials_sunmatrixsparse", "sundials_kinsol"]
- else:
- ext_list[-1].libraries = ["sundials_cvodes", "sundials_nvecserial", "sundials_idas"]
- if self.sundials_with_superlu and self.with_SLU: #If SUNDIALS is compiled with support for SuperLU
-@@ -444,7 +444,7 @@
- compile_time_env=compile_time_env, force=True)
- ext_list[-1].include_dirs = [np.get_include(), "assimulo","assimulo"+os.sep+"lib", self.incdirs]
- ext_list[-1].library_dirs = [self.libdirs]
-- ext_list[-1].libraries = ["sundials_kinsol", "sundials_nvecserial"]
-+ ext_list[-1].libraries = ["sundials_kinsol", "sundials_nvecserial", "sundials_cvodes", "sundials_idas"]
-
- if self.sundials_with_superlu and self.with_SLU: #If SUNDIALS is compiled with support for SuperLU
- ext_list[-1].include_dirs.append(self.SLUincdir)
-Index: src/lib/sundials_includes.pxd
-===================================================================
---- src/lib/sundials_includes.pxd (revision 875)
-+++ src/lib/sundials_includes.pxd (working copy)
-@@ -237,7 +237,7 @@
-
-
- cdef extern from "cvodes/cvodes.h":
-- void* CVodeCreate(int lmm, int iter)
-+ void* CVodeCreate(int lmm)
- ctypedef int (*CVRhsFn)(realtype t, N_Vector y, N_Vector ydot, void *f_data)
- int CVodeInit(void *cvode_mem, CVRhsFn f, realtype t0, N_Vector y0)
- int CVodeReInit(void *cvode_mem, realtype t0, N_Vector y0)
-Index: src/solvers/sundials.pyx
-===================================================================
---- src/solvers/sundials.pyx (revision 875)
-+++ src/solvers/sundials.pyx (working copy)
-@@ -1699,7 +1699,7 @@
- if self.cvode_mem == NULL: #The solver is not initialized
-
- #Create the solver
-- self.cvode_mem= SUNDIALS.CVodeCreate(CV_BDF if self.options["discr"] == "BDF" else CV_ADAMS, CV_NEWTON if self.options["iter"] == "Newton" else CV_FUNCTIONAL)
-+ self.cvode_mem= SUNDIALS.CVodeCreate(CV_BDF if self.options["discr"] == "BDF" else CV_ADAMS)
- if self.cvode_mem == NULL:
- raise CVodeError(CV_MEM_FAIL)
-
diff --git a/sundials5.patch b/sundials5.patch
new file mode 100644
index 000000000000..c283645b6e82
--- /dev/null
+++ b/sundials5.patch
@@ -0,0 +1,60 @@
+Index: setup.py
+===================================================================
+--- setup.py (revision 900)
++++ setup.py (working copy)
+@@ -378,7 +378,7 @@
+ with open(os.path.join(os.path.join(self.incdirs,'sundials'), 'sundials_config.h')) as f:
+ for line in f:
+ if "SUNDIALS_PACKAGE_VERSION" in line or "SUNDIALS_VERSION" in line:
+- sundials_version = tuple([int(f) for f in line.split()[-1][1:-1].split(".")])
++ sundials_version = tuple([int(f) for f in line.split()[-1][1:-1].split('-dev')[0].split(".")])
+ L.debug('SUNDIALS %d.%d found.'%(sundials_version[0], sundials_version[1]))
+ break
+ with open(os.path.join(os.path.join(self.incdirs,'sundials'), 'sundials_config.h')) as f:
+Index: src/lib/sundials_includes.pxd
+===================================================================
+--- src/lib/sundials_includes.pxd (revision 900)
++++ src/lib/sundials_includes.pxd (working copy)
+@@ -190,8 +190,10 @@
+ realtype **cols
+ ctypedef _DlsMat* DlsMat
+ cdef realtype* DENSE_COL(DlsMat A, int j)
+-
+-IF SUNDIALS_VERSION >= (2,6,3):
++
++IF SUNDIALS_VERSION >= (5,0,0):
++ pass
++ELIF SUNDIALS_VERSION >= (2,6,3):
+ cdef extern from "sundials/sundials_sparse.h":
+ cdef struct _SlsMat:
+ int M
+Index: src/solvers/kinsol.pyx
+===================================================================
+--- src/solvers/kinsol.pyx (revision 900)
++++ src/solvers/kinsol.pyx (working copy)
+@@ -31,7 +31,9 @@
+
+ #Various C includes transfered to namespace
+ from sundials_includes cimport N_Vector, realtype, N_VectorContent_Serial, DENSE_COL, sunindextype
+-from sundials_includes cimport memcpy, N_VNew_Serial, DlsMat, SlsMat, SUNMatrix, SUNMatrixContent_Dense, SUNMatrixContent_Sparse
++from sundials_includes cimport memcpy, N_VNew_Serial, DlsMat, SUNMatrix, SUNMatrixContent_Dense, SUNMatrixContent_Sparse
++IF SUNDIALS_VERSION < (5,0,0):
++ from sundials_includes cimport SlsMat
+ from sundials_includes cimport malloc, free, N_VCloneVectorArray_Serial
+ from sundials_includes cimport N_VConst_Serial, N_VDestroy_Serial
+
+Index: src/solvers/sundials.pyx
+===================================================================
+--- src/solvers/sundials.pyx (revision 900)
++++ src/solvers/sundials.pyx (working copy)
+@@ -35,7 +35,9 @@
+
+ #Various C includes transfered to namespace
+ from sundials_includes cimport N_Vector, realtype, N_VectorContent_Serial, DENSE_COL, sunindextype
+-from sundials_includes cimport memcpy, N_VNew_Serial, DlsMat, SlsMat, SUNMatrix, SUNMatrixContent_Dense, SUNMatrixContent_Sparse
++from sundials_includes cimport memcpy, N_VNew_Serial, DlsMat, SUNMatrix, SUNMatrixContent_Dense, SUNMatrixContent_Sparse
++IF SUNDIALS_VERSION < (5,0,0):
++ from sundials_includes cimport SlsMat
+ from sundials_includes cimport malloc, free, N_VCloneVectorArray_Serial
+ from sundials_includes cimport N_VConst_Serial, N_VDestroy_Serial
+