The package rpms/python-assimulo.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/python-assimulo.git/commit/?id=46....
Change:
+%ifarch %{openblas_arches}
Thanks.
Full change:
============
commit 464c352f6394be62d21419dbcd4d851f00a9ede5
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sat Dec 23 12:11:27 2017 +0100
Update to commit #845 (patched for newest Sundials releases)
diff --git a/.gitignore b/.gitignore
index e7675c0..5cd62a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/Assimulo-2.8.zip
/assimulo-licenses.tar.gz
/Assimulo-2.9.zip
+/assimulo-commit-845.tar.gz
diff --git a/python-assimulo-fix_numpy_rc_version.patch
b/python-assimulo-fix_numpy_rc_version.patch
new file mode 100644
index 0000000..e54774c
--- /dev/null
+++ b/python-assimulo-fix_numpy_rc_version.patch
@@ -0,0 +1,37 @@
+--- setup.orig.py 2017-12-22 11:48:05.000000000 +0100
++++ setup.py 2017-12-22 15:57:01.460996973 +0100
+@@ -23,7 +23,6 @@
+ import ctypes.util
+ import argparse
+ import numpy.distutils as nd
+-from distutils.version import StrictVersion
+ from os import listdir
+ from os.path import isfile, join
+
+@@ -456,7 +456,7 @@
+ config = np.distutils.misc_util.Configuration()
+ extraargs={'extra_link_args':extra_link_flags[:],
'extra_compile_args':extra_compile_flags[:]}
+
+- if StrictVersion(np.version.version) > StrictVersion("1.6.1"):
++ if np.version.version > "1.14.0":
+ extraargs['extra_f77_compile_args'] = extra_compile_flags[:]
+ extraargs['extra_f90_compile_args'] = extra_compile_flags[:]
+
+@@ -484,7 +484,7 @@
+ dasp3_f77_compile_flags =
["-fdefault-double-8","-fdefault-real-8"]
+ dasp3_f77_compile_flags += extra_compile_flags
+
+- if StrictVersion(np.version.version) > StrictVersion("1.6.1"):
#NOTE, THERE IS A PROBLEM WITH PASSING F77 COMPILER ARGS FOR NUMPY LESS THAN 1.6.1,
DISABLE FOR NOW
++ if np.version.version > "1.14.0": #NOTE, THERE IS A PROBLEM WITH
PASSING F77 COMPILER ARGS FOR NUMPY LESS THAN 1.6.1, DISABLE FOR NOW
+ dasp3_list = ['dasp3dp.pyf', 'DASP3.f',
'ANORM.f','CTRACT.f','DECOMP.f',
'HMAX.f','INIVAL.f','JACEST.f','PDERIV.f','PREPOL.f','SOLVE.f','SPAPAT.f']
+
src=['assimulo'+os.sep+'thirdparty'+os.sep+'dasp3'+os.sep+code for
code in dasp3_list]
+ config.add_extension('assimulo.lib.dasp3dp',
+@@ -500,7 +500,7 @@
+ glimda_list = ['glimda_complete.f','glimda_complete.pyf']
+
src=['assimulo'+os.sep+'thirdparty'+os.sep+'glimda'+os.sep+code
for code in glimda_list]
+ extraargs_glimda={'extra_link_args':extra_link_flags[:],
'extra_compile_args':extra_compile_flags[:], 'library_dirs':[self.BLASdir,
self.LAPACKdir], 'libraries':['lapack', 'blas']}
+- if StrictVersion(np.version.version) > StrictVersion("1.6.1"):
++ if np.version.version > "1.14.0":
+ extraargs_glimda["extra_f77_compile_args"] =
extra_compile_flags[:]
+ config.add_extension('assimulo.lib.glimda', sources=
src,include_dirs=[np.get_include()],**extraargs_glimda)
+ extra_link_flags=extra_link_flags[:-2] # remove LAPACK flags after GLIMDA
diff --git a/python-assimulo-set_sundials_dir.patch
b/python-assimulo-set_sundials_dir.patch
new file mode 100644
index 0000000..f1b3775
--- /dev/null
+++ b/python-assimulo-set_sundials_dir.patch
@@ -0,0 +1,13 @@
+--- setup.orig.py 2017-12-22 15:19:32.679902757 +0100
++++ setup.py 2017-12-22 15:18:47.175135428 +0100
+@@ -153,8 +153,8 @@
+ L.debug('Platform {}'.format(self.platform))
+
+ if args[0].sundials_home:
+- self.incdirs = os.path.join(self.sundialsdir,'include')
+- self.libdirs = os.path.join(self.sundialsdir,'lib')
++ self.incdirs = os.path.join(self.sundialsdir,'include')
++ self.libdirs = os.path.join(self.sundialsdir,'@@lib@@')
+ elif 'win' in self.platform:
+ self.incdirs = ''
+ self.libdirs = ''
diff --git a/python-assimulo-set_superlu_dir.patch
b/python-assimulo-set_superlu_dir.patch
index 7e7e819..51374b8 100644
--- a/python-assimulo-set_superlu_dir.patch
+++ b/python-assimulo-set_superlu_dir.patch
@@ -1,9 +1,9 @@
--- setup.orig.py 2016-04-20 14:45:58.000000000 +0200
+++ setup.py 2016-04-30 12:27:29.638984149 +0200
-@@ -276,8 +276,8 @@
- if not self.with_BLAS:
- L.warning(kinsol_msg+' as BLAS is missing.')
- elif self.SLUdir != "":
+@@ -281,8 +281,8 @@
+ sundials_msg='SUNDIALS will not be compiled with support for SuperLU'
+
+ if self.SLUdir != "":
- self.SLUincdir = os.path.join(self.SLUdir,'SRC')
- self.SLUlibdir = os.path.join(self.SLUdir,'lib')
+ self.SLUincdir = os.path.join(self.SLUdir,'@@inc@@')
diff --git a/python-assimulo.spec b/python-assimulo.spec
index 9949c14..178eecc 100644
--- a/python-assimulo.spec
+++ b/python-assimulo.spec
@@ -2,15 +2,32 @@
%global with_python3 1
%endif
+# openblas available on these architectures.
+%if 0%{?fedora} && 0%{?fedora} > 26
+%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64
s390x}
+%else
+%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64}
+%endif
+%if 0%{?rhel}
+%{!?openblas_arches:%global openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64}
+%endif
+
%global pname assimulo
+%global checkout 845
+%global date 20171222
Name: python-%{pname}
Version: 2.9
-Release: 15%{?dist}
+Release: 16.%{date}svn%{checkout}%{?dist}
Summary: Ordinary differential and differential algebraic equations solver
License: LGPLv3+ and LGPLv2+ and BSD and GPLv3
URL:
http://www.jmodelica.org/assimulo
-Source0:
https://pypi.python.org/packages/source/A/Assimulo/Assimulo-%{version}.zip
+
+## Source archive made by using following commands
+## svn checkout
https://svn.jmodelica.org/assimulo/trunk
+## rm -rf trunk/.svn
+## tar -cvzf assimulo-commit-%%{checkout}.tar.gz trunk
+Source0: assimulo-commit-%{checkout}.tar.gz
##http://www.gnu.org/licenses/gpl-3.0.txt
##http://www.gnu.org/licenses/lgpl-3.0.txt
@@ -19,10 +36,19 @@ Source1: %{pname}-licenses.tar.gz
BuildRequires: python2-devel, python-setuptools, python-nose
BuildRequires: numpy, pytest, Cython, python-matplotlib
-BuildRequires: sundials-devel, lapack-devel, blas-devel, gcc-gfortran
-BuildRequires: blas-static, numpy-f2py, scipy, dos2unix, xorg-x11-server-Xvfb
+BuildRequires: sundials-devel
+BuildRequires: gcc-gfortran
+%ifarch %{openblas_arches}
+BuildRequires: openblas-devel, openblas-srpm-macros, openblas-static
+%else
+BuildRequires: blas-devel, blas-static
+BuildRequires: lapack-devel, lapack-static
+%endif
+BuildRequires: numpy-f2py, scipy, dos2unix, xorg-x11-server-Xvfb
BuildRequires: qhull-devel
-#BuildRequires: SuperLU-devel
+%ifnarch %{power64} aarch64
+BuildRequires: SuperLU-devel
+%endif
Requires: python-matplotlib, numpy, scipy
##This patch changes the tolerance in the mechanical systems test
@@ -32,6 +58,10 @@ Requires: python-matplotlib, numpy, scipy
Patch0: %{pname}-mech_system_pendulum.patch
Patch1: python-%{pname}-set_superlu_dir.patch
+Patch2: python-%{pname}-set_sundials_dir.patch
+
+# ValueError: invalid version number '1.14.0rc1'
+Patch3: python-%{pname}-fix_numpy_rc_version.patch
%description
Assimulo is a Cython/Python based simulation package that allows for simulation
@@ -68,7 +98,7 @@ Requires: python3-matplotlib, python3-numpy, python3-scipy
%prep
%setup -qc
-mv Assimulo-%{version} python2
+mv trunk python2
pushd python2
##Copy license files
@@ -76,15 +106,21 @@ tar -xf %{SOURCE1}
dos2unix */*
%if 0%{?fedora} > 25 || 0%{?rhel}
-%patch0 -p0
+%patch0 -p1
%endif
%patch1 -p0
+%patch2 -p0
+%if 0%{?fedora} > 27
+%patch3 -p0
+%endif
sed -i 's|/usr/local/include|%{_includedir}|g' setup.py
sed -i 's|/usr/local/lib|%{_libdir}|g' setup.py
-##sed -i 's|@@lib@@|%%{_libdir}|g' setup.py
-##sed -i 's|@@inc@@|%%{_includedir}/SuperLU|g' setup.py
+%ifnarch %{power64} aarch64
+sed -i 's|@@lib@@|%{_libdir}|g' setup.py
+sed -i 's|@@inc@@|%{_includedir}/SuperLU|g' setup.py
+%endif
popd
%if 0%{?with_python3}
@@ -94,25 +130,53 @@ cp -a python2 python3
%build
pushd python2
sed -i 's|1s|^#!python|#!%{__python2}|g' setup.py
+
+%ifarch %{openblas_arches}
+export BLASNAME=openblas
+export INCBLAS=-I%{_includedir}/openblas
+%else
+export BLASNAME=
+export INCBLAS=-I%{_includedir}
+%endif
+
CFLAGS="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp" \
LDFLAGS="%{__global_ldflags} -shared -Wl,--as-needed -Wl,-z,now" \
FFLAGS="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp" \
%{__python2} setup.py build --executable="%{__python2} -s" \
- --blas-home=%{_libdir} --sundials-home=%{_prefix} --lapack-home=%{_libdir} \
- --superlu-home=%{_libdir} --sundials-with-superlu=false \
- --extra-c-flags="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp"
+ --blas-home=%{_libdir} --extra-c-flags=$INCBLAS \
+ --blas-name=$BLASNAME --lapack-home=%{_libdir} \
+ --sundials-home=%{_prefix} \
+%ifnarch %{power64} aarch64
+ --superlu-home=%{_libdir} \
+%endif
+ --sundials-with-superlu=false --with_openmp=true \
+ --extra-c-flags="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp"
--log=DEBUG
popd
%if 0%{?with_python3}
pushd python3
sed -i 's|1s|^#!python|#!%{__python3}|g' setup.py
+
+%ifarch %{openblas_arches}
+export BLASNAME=openblas
+export INCBLAS=-I%{_includedir}/openblas
+%else
+export BLASNAME=blas
+export INCBLAS=-I%{_includedir}
+%endif
+
CFLAGS="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp" \
LDFLAGS="%{__global_ldflags} -shared -Wl,--as-needed -Wl,-z,now" \
FFLAGS="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp" \
%{__python3} setup.py build --executable="%{__python3} -s" \
- --blas-home=%{_libdir} --sundials-home=%{_prefix} --lapack-home=%{_libdir} \
- --superlu-home=%{_prefix} --sundials-with-superlu=false \
- --extra-c-flags="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp"
+ --blas-home=%{_libdir} --extra-c-flags=$INCBLAS \
+ --blas-name=$BLASNAME --lapack-home=%{_libdir} \
+ --sundials-home=%{_prefix} \
+%ifnarch %{power64} aarch64
+ --superlu-home=%{_libdir} \
+%endif
+ --sundials-with-superlu=false --with_openmp=true \
+ --extra-c-flags="%{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp"
--log=DEBUG
popd
%endif # with_python3
@@ -152,15 +216,21 @@ done
%check
# test_dasp3_basic disabled
# See
http://www.jmodelica.org/27779
-pushd python2/%{pname}/tests
+pushd python2/tests
+%ifarch %{openblas_arches}
+export BLASLIB=libopenblas.so
+export LAPACKLIB=
+%else
+export BLASLIB=libblas.so
+export LAPACKLIB=liblapack.so
+%endif
rm -f __init__.py
find . -name '*.pyc' -delete
-LD_PRELOAD=%{_libdir}/lapack.so
-LD_PRELOAD=%{_libdir}/lablas.so
+LD_PRELOAD=%{_libdir}/$BLASLIB:%{_libdir}/$LAPACKLIB
LD_PRELOAD=%{_libdir}/libsundials_idas.so
LD_PRELOAD=%{_libdir}/libsundials_cvodes.so
export PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch}
-%if 0%{?rhel} || 0%{?fedora} < 24
+%if 0%{?rhel}
xvfb-run -a nosetests -v
%else
nosetests -v
@@ -168,15 +238,21 @@ nosetests -v
popd
%if 0%{?with_python3}
-pushd python3/%{pname}/tests
+pushd python3/tests
+%ifarch %{openblas_arches}
+export BLASLIB=libopenblas.so
+export LAPACKLIB=
+%else
+export BLASLIB=libblas.so
+export LAPACKLIB=liblapack.so
+%endif
rm -f __init__.py
find . -name '*.pyc' -delete
-LD_PRELOAD=%{_libdir}/lapack.so
-LD_PRELOAD=%{_libdir}/lablas.so
+LD_PRELOAD=%{_libdir}/$BLASLIB:%{_libdir}/$LAPACKLIB
LD_PRELOAD=%{_libdir}/libsundials_idas.so
LD_PRELOAD=%{_libdir}/libsundials_cvodes.so
export PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch}
-%if 0%{?rhel} || 0%{?fedora} < 24
+%if 0%{?rhel}
xvfb-run -a nosetests-%{python3_version} -v
%else
nosetests-%{python3_version} -v
@@ -186,19 +262,24 @@ popd
%files -n python2-%{pname}
%doc python2/README python2/CHANGELOG
-%license python2/assimulo/thirdparty/*/LICENSE_* python2/*.txt
+%license python2/thirdparty/*/LICENSE_* python2/*.txt
%{python2_sitearch}/*.egg-info
%{python2_sitearch}/assimulo/
%if 0%{?with_python3}
%files -n python3-%{pname}
%doc python3/README python3/CHANGELOG
-%license python3/assimulo/thirdparty/*/LICENSE_* python3/*.txt
+%license python3/thirdparty/*/LICENSE_* python3/*.txt
%{python3_sitearch}/*.egg-info
%{python3_sitearch}/assimulo/
%endif
%changelog
+* Fri Dec 22 2017 Antonio Trande <sagitterATfedoraproject.org> -
2.9-16.20171222svn845
+- Rebuild for sundials-3*
+- Update to commit #845 (patched for newest Sundials releases)
+- Rebuild agaist openblas if possible
+
* Wed Aug 16 2017 Antonio Trande <sagitterATfedoraproject.org> - 2.9-15
- Fix Summary tag
diff --git a/sources b/sources
index 6c8182d..a14b5fe 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (Assimulo-2.9.zip) =
00a780bc4e5672635e2b98260870fe056a160fbaf4a4204c4094cc999478eff1f5d0f4dd2b4fffef7714ab442b33416abc237008f65057b342e209f0ffc312de
+SHA512 (assimulo-commit-845.tar.gz) =
887fbc544683ec5e3c4811ec082f4643fbfe268e05e9974cb7114ba1b0a67bec48f1fbda576e2a10140788436a786eb5783ff885b6788a5a2242eddf22d4b8ab
SHA512 (assimulo-licenses.tar.gz) =
d13a7f0f03aea4037571ad2953982cd279806664714a8827347f1f95fbb60fdff0168270b85fe13e9196e0a178e1df79702ffbee3077c9a57370aad44221cfc2