Update to 1.3.1, drop Py2 packages (not supported)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1674101
This commit is contained in:
Miro Hrončok 2019-10-18 14:29:03 +02:00
parent 76ca11c616
commit 70ed1cdf04

View File

@ -6,8 +6,8 @@
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Name: scipy Name: scipy
Version: 1.2.1 Version: 1.3.1
Release: 8%{?dist} Release: 1%{?dist}
# BSD -- whole package except: # BSD -- whole package except:
# Boost -- scipy/special/cephes/scipy_iv.c # 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. # structure fields accessed in __odrpack.c are now deprecated.
Patch1: numpy-deprecation-warnings.patch 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 BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel
%ifarch %{openblas_arches} %ifarch %{openblas_arches}
BuildRequires: openblas-devel BuildRequires: openblas-devel
@ -45,11 +43,6 @@ BuildRequires: python3-pytest-xdist
BuildRequires: python3-pytest-timeout BuildRequires: python3-pytest-timeout
%if %{with doc} %if %{with doc}
%if 0%{?fedora} < 31
BuildRequires: python2-sphinx
BuildRequires: python2-matplotlib
BuildRequires: python2-numpydoc
%endif
BuildRequires: python3-sphinx BuildRequires: python3-sphinx
BuildRequires: python3-matplotlib BuildRequires: python3-matplotlib
BuildRequires: python3-numpydoc BuildRequires: python3-numpydoc
@ -68,23 +61,14 @@ leading scientists and engineers.}
%description %_description %description %_description
%package -n python2-scipy %package -n python3-scipy
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Requires: numpy, f2py License: BSD and LGPLv2+
%{?python_provide:%python_provide python2-scipy} Requires: python3-numpy, python3-f2py
# General provides of plain 'scipy' in F24 %{?python_provide:%python_provide python3-scipy}
Provides: scipy = %{version}-%{release} %description -n python3-scipy %_description
Provides: scipy%{?_isa} = %{version}-%{release}
Obsoletes: scipy <= 0.16.0
%description -n python2-scipy %_description
%if %{with doc} %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 %package -n python3-scipy-doc
Summary: Scientific Tools for Python - documentation Summary: Scientific Tools for Python - documentation
Requires: python3-scipy = %{version}-%{release} Requires: python3-scipy = %{version}-%{release}
@ -92,12 +76,6 @@ Requires: python3-scipy = %{version}-%{release}
HTML documentation for Scipy HTML documentation for Scipy
%endif %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 %prep
%autosetup -p1 -n %{name}-%{version}%{?rcver} %autosetup -p1 -n %{name}-%{version}%{?rcver}
@ -129,7 +107,7 @@ rm doc/sphinxext -r
rm $(grep -rl '/\* Generated by Cython') PKG-INFO rm $(grep -rl '/\* Generated by Cython') PKG-INFO
%build %build
for PY in %{python3_version} %{python2_version}; do for PY in %{python3_version}; do
env CFLAGS="$RPM_OPT_FLAGS -lm" \ env CFLAGS="$RPM_OPT_FLAGS -lm" \
FFLAGS="$RPM_OPT_FLAGS -fPIC" \ FFLAGS="$RPM_OPT_FLAGS -fPIC" \
%ifarch %{openblas_arches} %ifarch %{openblas_arches}
@ -143,24 +121,18 @@ for PY in %{python3_version} %{python2_version}; do
build build
%if %{with doc} %if %{with doc}
# No python2-sphinx on Fedora 31+ pushd doc
if [ $PY == %{python3_version} -o 0%{?fedora} -lt 31 ] export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/)
then make html SPHINXBUILD=sphinx-build-$PY
pushd doc rm -rf build/html/.buildinfo
export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/) mv build build-$PY
make html SPHINXBUILD=sphinx-build-$PY popd
rm -rf build/html/.buildinfo
mv build build-$PY
popd
fi
%endif %endif
done done
%install %install
%py3_install %py3_install
%py2_install
# Some files got ambiguous python shebangs, we fix them after everything else is done # 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} pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
%check %check
@ -197,24 +169,6 @@ pushd %{buildroot}/%{python3_sitearch}
rm -rf gram{A,B} rm -rf gram{A,B}
popd 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 %files -n python3-scipy
%doc LICENSE.txt %doc LICENSE.txt
%{python3_sitearch}/scipy/ %{python3_sitearch}/scipy/
@ -227,6 +181,10 @@ popd
%endif %endif
%changelog %changelog
* Fri Oct 18 2019 Miro Hrončok <mhroncok@redhat.com> - 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 <mhroncok@redhat.com> - 1.2.1-8 * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-8
- Rebuilt for Python 3.8.0rc1 (#1748018) - Rebuilt for Python 3.8.0rc1 (#1748018)