From 70ed1cdf041cc412766fb7b37ba3721987b0b7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 18 Oct 2019 14:29:03 +0200 Subject: [PATCH] Update to 1.3.1, drop Py2 packages (not supported) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1674101 --- scipy.spec | 78 +++++++++++++----------------------------------------- 1 file changed, 18 insertions(+), 60 deletions(-) diff --git a/scipy.spec b/scipy.spec index 1f4b610..0f0f828 100644 --- a/scipy.spec +++ b/scipy.spec @@ -6,8 +6,8 @@ Summary: Scientific Tools for Python Name: scipy -Version: 1.2.1 -Release: 8%{?dist} +Version: 1.3.1 +Release: 1%{?dist} # BSD -- whole package except: # Boost -- scipy/special/cephes/scipy_iv.c @@ -25,8 +25,6 @@ Patch0: acceptable_failure_rate.patch # structure fields accessed in __odrpack.c are now deprecated. Patch1: numpy-deprecation-warnings.patch -BuildRequires: python2-numpy, python2-devel,python2-numpy-f2py -BuildRequires: python2-pytest BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel %ifarch %{openblas_arches} BuildRequires: openblas-devel @@ -45,11 +43,6 @@ BuildRequires: python3-pytest-xdist BuildRequires: python3-pytest-timeout %if %{with doc} -%if 0%{?fedora} < 31 -BuildRequires: python2-sphinx -BuildRequires: python2-matplotlib -BuildRequires: python2-numpydoc -%endif BuildRequires: python3-sphinx BuildRequires: python3-matplotlib BuildRequires: python3-numpydoc @@ -68,23 +61,14 @@ leading scientists and engineers.} %description %_description -%package -n python2-scipy +%package -n python3-scipy Summary: Scientific Tools for Python -Requires: numpy, f2py -%{?python_provide:%python_provide python2-scipy} -# General provides of plain 'scipy' in F24 -Provides: scipy = %{version}-%{release} -Provides: scipy%{?_isa} = %{version}-%{release} -Obsoletes: scipy <= 0.16.0 -%description -n python2-scipy %_description +License: BSD and LGPLv2+ +Requires: python3-numpy, python3-f2py +%{?python_provide:%python_provide python3-scipy} +%description -n python3-scipy %_description %if %{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 - %package -n python3-scipy-doc Summary: Scientific Tools for Python - documentation Requires: python3-scipy = %{version}-%{release} @@ -92,12 +76,6 @@ Requires: python3-scipy = %{version}-%{release} HTML documentation for Scipy %endif -%package -n python3-scipy -Summary: Scientific Tools for Python -License: BSD and LGPLv2+ -Requires: python3-numpy, python3-f2py -%{?python_provide:%python_provide python3-scipy} -%description -n python3-scipy %_description %prep %autosetup -p1 -n %{name}-%{version}%{?rcver} @@ -129,7 +107,7 @@ rm doc/sphinxext -r rm $(grep -rl '/\* Generated by Cython') PKG-INFO %build -for PY in %{python3_version} %{python2_version}; do +for PY in %{python3_version}; do env CFLAGS="$RPM_OPT_FLAGS -lm" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \ %ifarch %{openblas_arches} @@ -143,24 +121,18 @@ for PY in %{python3_version} %{python2_version}; do build %if %{with doc} - # No python2-sphinx on Fedora 31+ - if [ $PY == %{python3_version} -o 0%{?fedora} -lt 31 ] - then - pushd doc - export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/) - make html SPHINXBUILD=sphinx-build-$PY - rm -rf build/html/.buildinfo - mv build build-$PY - popd - fi + pushd doc + export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/) + make html SPHINXBUILD=sphinx-build-$PY + rm -rf build/html/.buildinfo + mv build build-$PY + popd %endif done %install %py3_install -%py2_install # Some files got ambiguous python shebangs, we fix them after everything else is done -pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}%{python2_sitearch} pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch} %check @@ -197,24 +169,6 @@ pushd %{buildroot}/%{python3_sitearch} rm -rf gram{A,B} popd -pushd %{buildroot}/%{python2_sitearch} -%{__python2} -m pytest -k "$k" scipy -# Remove test remnants -rm -f gram{A,B} -popd - - -%files -n python2-scipy -%doc LICENSE.txt -%{python2_sitearch}/scipy/ -%{python2_sitearch}/*.egg-info - -%if %{with doc} && 0%{?fedora} < 31 -%files -n python2-scipy-doc -%license LICENSE.txt -%doc doc/build-%{python2_version}/html -%endif - %files -n python3-scipy %doc LICENSE.txt %{python3_sitearch}/scipy/ @@ -227,6 +181,10 @@ popd %endif %changelog +* Fri Oct 18 2019 Miro Hrončok - 1.3.1-1 +- Update to 1.3.1 (#1674101) +- Drop Python 2 packages (not supported by SciPy >= 1.3) + * Thu Oct 03 2019 Miro Hrončok - 1.2.1-8 - Rebuilt for Python 3.8.0rc1 (#1748018)