From e5a2f382bbe583a7fc3f74d8448a4c804051c2d2 Mon Sep 17 00:00:00 2001 From: Thomas Spura Date: Thu, 26 Oct 2017 19:04:11 +0200 Subject: [PATCH 1/5] update to 1.0.0 and use pytest instead of nose --- .gitignore | 1 + scipy.spec | 16 ++++++++++------ sources | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index cee976e..db13cf9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ scipy-0.7.2.tar.gz /scipy-0.18.0.tar.xz /scipy-0.19.0.tar.xz /scipy-0.19.1.tar.xz +/scipy-1.0.0.tar.xz diff --git a/scipy.spec b/scipy.spec index 2055222..55c5853 100644 --- a/scipy.spec +++ b/scipy.spec @@ -10,8 +10,8 @@ Summary: Scientific Tools for Python Name: scipy -Version: 0.19.1 -Release: 5%{?dist} +Version: 1.0.0 +Release: 1%{?dist} Group: Development/Libraries # BSD -- whole package except: @@ -22,6 +22,7 @@ Url: http://www.scipy.org/scipylib/index.html Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.xz BuildRequires: numpy, python2-devel,f2py +BuildRequires: python2-pytest BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel %ifarch %{openblas_arches} %ifnarch ppc64 @@ -39,7 +40,7 @@ BuildRequires: qhull-devel %if 0%{?with_python3} BuildRequires: python3-numpy, python3-devel, python3-f2py BuildRequires: python3-setuptools -BuildRequires: python3-nose +BuildRequires: python3-pytest %endif %description @@ -138,7 +139,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %endif %else ATLAS=%{_libdir}/atlas \ -%endif +%endif FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \ %__python2 setup.py config_fc \ --fcompiler=gnu95 --noarch build @@ -158,7 +159,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %endif %else ATLAS=%{_libdir}/atlas \ -%endif +%endif FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \ %__python3 setup.py install --root=$RPM_BUILD_ROOT %endif # with_python3 @@ -173,7 +174,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %endif %else ATLAS=%{_libdir}/atlas \ -%endif +%endif FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \ %__python2 setup.py install --root=$RPM_BUILD_ROOT @@ -206,6 +207,9 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ %endif # with_python3 %changelog +* Thu Oct 26 2017 Thomas Spura - 1.0.0-1 +- update to 1.0.0 and use pytest instead of nose + * Wed Oct 04 2017 Christian Dersch - 0.19.1-5 - Use openblas where available (except ppc64), to use same as numpy (BZ 1472318) diff --git a/sources b/sources index c2f552b..c8979b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (scipy-0.19.1.tar.xz) = a9c2c95431e6442d3c2557b891e7a54aeed637ecb5a55d2f2391fd599e24be1848505dcd7d27b3eca16d8954ed43838c4e8b207f67ab2a80f1fe95ae492ead73 +SHA512 (scipy-1.0.0.tar.xz) = 541bf377fd67ac15dec55ecd6435a2c0e3043bbdc4fdce05e584db123f113141c8713a07a5895597cb3c3449af493453391ffb1ab9251f054646b4133f651633 From c6f0b45631709a9251261ffdbf835c0a819b0717 Mon Sep 17 00:00:00 2001 From: Thomas Spura Date: Sun, 29 Oct 2017 04:05:25 +0100 Subject: [PATCH 2/5] Use timeout during parallel %%check --- scipy.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scipy.spec b/scipy.spec index 55c5853..d475b45 100644 --- a/scipy.spec +++ b/scipy.spec @@ -23,6 +23,8 @@ Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-% BuildRequires: numpy, python2-devel,f2py BuildRequires: python2-pytest +BuildRequires: python2-pytest-xdist +BuildRequires: python2-pytest-timeout BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel %ifarch %{openblas_arches} %ifnarch ppc64 @@ -41,6 +43,8 @@ BuildRequires: qhull-devel BuildRequires: python3-numpy, python3-devel, python3-f2py BuildRequires: python3-setuptools BuildRequires: python3-pytest +BuildRequires: python3-pytest-xdist +BuildRequires: python3-pytest-timeout %endif %description @@ -184,13 +188,13 @@ env CFLAGS="$RPM_OPT_FLAGS" \ mkdir test3 cd test3 PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} \ - %__python3 -c "import scipy; scipy.test('full', verbose=2)" || : + %__python3 -c "import scipy; scipy.test('full', verbose=2, extra_argv=['-n $(getconf _NPROCESSORS_ONLN)', '--timeout=300'])" || : %endif # with_python3 mkdir test2 cd test2 PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ - %__python2 -c "import scipy; scipy.test('full', verbose=2)" || : + %__python2 -c "import scipy; scipy.test('full', verbose=2, extra_argv=['-n $(getconf _NPROCESSORS_ONLN)', '--timeout=300'])" || : %files -n python2-scipy @@ -209,6 +213,7 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ %changelog * Thu Oct 26 2017 Thomas Spura - 1.0.0-1 - update to 1.0.0 and use pytest instead of nose +- use timeout during parallel %%check * Wed Oct 04 2017 Christian Dersch - 0.19.1-5 - Use openblas where available (except ppc64), to use same as numpy (BZ 1472318) From 4e4627bca5e274fbdcb708f2101a2f8415990666 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Tue, 31 Oct 2017 23:42:42 +0100 Subject: [PATCH 3/5] Disable parallel test execution, OpenBLAS related fixes --- scipy.spec | 49 +++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/scipy.spec b/scipy.spec index d475b45..3996485 100644 --- a/scipy.spec +++ b/scipy.spec @@ -11,7 +11,7 @@ Summary: Scientific Tools for Python Name: scipy Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries # BSD -- whole package except: @@ -27,15 +27,10 @@ BuildRequires: python2-pytest-xdist BuildRequires: python2-pytest-timeout BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel %ifarch %{openblas_arches} -%ifnarch ppc64 -# prefer atlas on ppc64 big endian BuildRequires: openblas-devel %else BuildRequires: atlas-devel %endif -%else -BuildRequires: atlas-devel -%endif BuildRequires: gcc-gfortran, swig BuildRequires: qhull-devel @@ -112,6 +107,12 @@ amd_libs = amd library_dirs = %{_libdir} include_dirs = /usr/include/suitesparse umfpack_libs = umfpack + +%ifarch %{openblas_arches} +[openblas] +library_dirs = %{_libdir} +openblas_libs = openblasp +%endif EOF @@ -120,11 +121,7 @@ EOF env CFLAGS="$RPM_OPT_FLAGS" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \ %ifarch %{openblas_arches} -%ifnarch ppc64 OPENBLAS=%{_libdir} \ -%else - ATLAS=%{_libdir}/atlas \ -%endif %else ATLAS=%{_libdir}/atlas \ %endif @@ -136,11 +133,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ env CFLAGS="$RPM_OPT_FLAGS" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \ %ifarch %{openblas_arches} -%ifnarch ppc64 OPENBLAS=%{_libdir} \ -%else - ATLAS=%{_libdir}/atlas \ -%endif %else ATLAS=%{_libdir}/atlas \ %endif @@ -156,11 +149,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ env CFLAGS="$RPM_OPT_FLAGS" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \ %ifarch %{openblas_arches} -%ifnarch ppc64 OPENBLAS=%{_libdir} \ -%else - ATLAS=%{_libdir}/atlas \ -%endif %else ATLAS=%{_libdir}/atlas \ %endif @@ -171,11 +160,7 @@ env CFLAGS="$RPM_OPT_FLAGS" \ env CFLAGS="$RPM_OPT_FLAGS" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \ %ifarch %{openblas_arches} -%ifnarch ppc64 OPENBLAS=%{_libdir} \ -%else - ATLAS=%{_libdir}/atlas \ -%endif %else ATLAS=%{_libdir}/atlas \ %endif @@ -185,16 +170,14 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %check %if 0%{?with_python3} -mkdir test3 -cd test3 -PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} \ - %__python3 -c "import scipy; scipy.test('full', verbose=2, extra_argv=['-n $(getconf _NPROCESSORS_ONLN)', '--timeout=300'])" || : +pushd %{buildroot}/%{python3_sitearch} +py.test-%{python3_version} --timeout=300 -k "not test_denormals" scipy || : +popd %endif # with_python3 -mkdir test2 -cd test2 -PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ - %__python2 -c "import scipy; scipy.test('full', verbose=2, extra_argv=['-n $(getconf _NPROCESSORS_ONLN)', '--timeout=300'])" || : +pushd %{buildroot}/%{python2_sitearch} +py.test-%{python2_version} --timeout=300 -k "not test_denormals" scipy || : +popd %files -n python2-scipy @@ -211,6 +194,12 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ %endif # with_python3 %changelog +* Tue Oct 31 2017 Christian Dersch - 1.0.0-2 +- Use openblas where available https://fedoraproject.org/wiki/Changes/OpenBLAS_as_default_BLAS +- Remove ppc64 hackery for OpenBLAS +- Don't run tests in parallel as pytest crashes +- Don't run test_denormals as it tends to stuck + * Thu Oct 26 2017 Thomas Spura - 1.0.0-1 - update to 1.0.0 and use pytest instead of nose - use timeout during parallel %%check From dc3fd840b8f4f202eb0aa5684598b19cd38e753f Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Mon, 20 Nov 2017 14:57:38 +0100 Subject: [PATCH 4/5] New subpackages with HTML documentation --- scipy.spec | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/scipy.spec b/scipy.spec index 3996485..3419567 100644 --- a/scipy.spec +++ b/scipy.spec @@ -1,4 +1,5 @@ %global with_python3 1 +%global with_doc 1 %{?filter_setup: %filter_provides_in %{python2_sitearch}.*\.so$ %filter_provides_in %{python3_sitearch}.*\.so$ @@ -11,7 +12,7 @@ Summary: Scientific Tools for Python Name: scipy Version: 1.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Libraries # BSD -- whole package except: @@ -41,6 +42,16 @@ BuildRequires: python3-pytest BuildRequires: python3-pytest-xdist BuildRequires: python3-pytest-timeout %endif +%if 0%{?with_doc} +BuildRequires: python2-sphinx +BuildRequires: python2-matplotlib +BuildRequires: python2-numpydoc +%if 0%{?with_python3} +BuildRequires: python3-sphinx +BuildRequires: python3-matplotlib +BuildRequires: python3-numpydoc +%endif # with_python3 +%endif # with_doc %description Scipy is open-source software for mathematics, science, and @@ -73,6 +84,21 @@ quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. +%if 0%{?with_doc} +%package -n python2-scipy-doc +Summary: Scientific Tools for Python - documentation +Requires: python2-scipy = %{version}-%{release} +%description -n python2-scipy-doc +HTML documentation for Scipy + +%if 0%{?with_python3} +%package -n python3-scipy-doc +Summary: Scientific Tools for Python - documentation +Requires: python3-scipy = %{version}-%{release} +%description -n python3-scipy-doc +HTML documentation for Scipy +%endif # with_python3 +%endif # with_doc %if 0%{?with_python3} %package -n python3-scipy @@ -127,7 +153,14 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %endif FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \ %__python3 setup.py config_fc \ - --fcompiler=gnu95 --noarch build + --fcompiler=gnu95 --noarch \ +%if 0%{?with_doc} + build_sphinx + rm -r build/sphinx/html/.buildinfo + mv build/sphinx build/sphinx-%{python3_version} +%else + build +%endif # with_doc %endif # with _python3 env CFLAGS="$RPM_OPT_FLAGS" \ @@ -139,8 +172,14 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %endif FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \ %__python2 setup.py config_fc \ - --fcompiler=gnu95 --noarch build - + --fcompiler=gnu95 --noarch \ +%if 0%{?with_doc} + build_sphinx + rm -r build/sphinx/html/.buildinfo + mv build/sphinx build/sphinx-%{python2_version} +%else + build +%endif # with_doc %install @@ -185,15 +224,29 @@ popd %{python2_sitearch}/scipy %{python2_sitearch}/*.egg-info +%if 0%{?with_doc} +%files -n python2-scipy-doc +%license LICENSE.txt +%doc build/sphinx-%{python2_version}/html +%endif # with_doc %if 0%{?with_python3} %files -n python3-scipy %doc LICENSE.txt %{python3_sitearch}/scipy %{python3_sitearch}/*.egg-info + +%if 0%{?with_doc} +%files -n python3-scipy-doc +%license LICENSE.txt +%doc build/sphinx-%{python3_version}/html +%endif # with_doc %endif # with_python3 %changelog +* Mon Nov 20 2017 Lumír Balhar - 1.0.0-3 +- New subpackages with HTML documentation + * Tue Oct 31 2017 Christian Dersch - 1.0.0-2 - Use openblas where available https://fedoraproject.org/wiki/Changes/OpenBLAS_as_default_BLAS - Remove ppc64 hackery for OpenBLAS From dd19a3061bce61d67adaf8b622f4ec11be7556a2 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 13 Dec 2017 15:25:23 +0100 Subject: [PATCH 5/5] Disable tests on s390x --- scipy.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scipy.spec b/scipy.spec index 3419567..7e5061e 100644 --- a/scipy.spec +++ b/scipy.spec @@ -12,7 +12,7 @@ Summary: Scientific Tools for Python Name: scipy Version: 1.0.0 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/Libraries # BSD -- whole package except: @@ -208,6 +208,11 @@ env CFLAGS="$RPM_OPT_FLAGS" \ %check +# Skip all tests on s390x because they hangs unexpectedly and randomly +# and pytest-timeout has no effect. Note that the outcome of the tests +# is ignored anyway so by disabling the test for s390x we are not doing +# anything more dangerous. +%ifnarch s390x %if 0%{?with_python3} pushd %{buildroot}/%{python3_sitearch} py.test-%{python3_version} --timeout=300 -k "not test_denormals" scipy || : @@ -218,6 +223,7 @@ pushd %{buildroot}/%{python2_sitearch} py.test-%{python2_version} --timeout=300 -k "not test_denormals" scipy || : popd +%endif # ifnarch s390x %files -n python2-scipy %doc LICENSE.txt @@ -244,6 +250,9 @@ popd %endif # with_python3 %changelog +* Mon Dec 11 2017 Lumír Balhar - 1.0.0-4 +- Disable tests on s390x + * Mon Nov 20 2017 Lumír Balhar - 1.0.0-3 - New subpackages with HTML documentation