Compare commits

..

No commits in common. "f36" and "master" have entirely different histories.
f36 ... master

5 changed files with 109 additions and 121 deletions

7
.gitignore vendored
View File

@ -32,10 +32,3 @@ scipy-0.7.2.tar.gz
/scipy-1.5.2.tar.gz
/scipy-1.5.3.tar.gz
/scipy-1.5.4.tar.gz
/scipy-1.6.0.tar.gz
/scipy-1.6.1.tar.gz
/scipy-1.6.2.tar.gz
/scipy-1.7.0.tar.gz
/scipy-1.7.3.tar.gz
/scipy-1.8.0.tar.gz
/scipy-1.8.1.tar.gz

View File

@ -1,16 +1,6 @@
# without means enabled
%bcond_with doc
# Pythran is an optional build dependency.
# When used, it makes some modules faster,
# but it is usually not available soon enough for new major Python versions.
%ifarch i686 || armv7hl
# It seems pythran is broken on 32-bit arches, disable it
%bcond_with pythran
%else
%bcond_without pythran
%endif
# Set to pre-release version suffix if building pre-release, else %%{nil}
%global rcver %{nil}
@ -24,8 +14,8 @@
Summary: Scientific Tools for Python
Name: scipy
Version: 1.8.1
Release: 1%{?dist}
Version: 1.5.4
Release: 2%{?dist}
# BSD -- whole package except:
# Boost -- scipy/special/cephes/scipy_iv.c
@ -34,6 +24,11 @@ License: BSD and Boost and Public Domain
Url: http://www.scipy.org/scipylib/index.html
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
# https://github.com/scipy/scipy/pull/12899
Patch0: skip-certain-tests-on-32-bit-arches.patch
# https://github.com/scipy/scipy/pull/13130
Patch1: skip-factorial-float-tests-on-py310.patch
BuildRequires: fftw-devel, suitesparse-devel
BuildRequires: %{blaslib}-devel
BuildRequires: gcc-gfortran, swig, gcc-c++
@ -49,10 +44,6 @@ BuildRequires: python3-pytest
BuildRequires: python3-pytest-xdist
BuildRequires: python3-pytest-timeout
%if %{with pythran}
BuildRequires: pythran
%endif
%if %{with doc}
BuildRequires: python3-sphinx
BuildRequires: python3-matplotlib
@ -115,8 +106,6 @@ rm doc/sphinxext -r
rm $(grep -rl '/\* Generated by Cython') PKG-INFO
%build
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
for PY in %{python3_version}; do
# Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611
env CFLAGS="$RPM_OPT_FLAGS -lm" \
@ -125,12 +114,8 @@ for PY in %{python3_version}; do
%else
FFLAGS="$RPM_OPT_FLAGS -fPIC" \
%endif
%ifarch x86_64
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2068530
LDFLAGS="%{__global_ldflags} -Wl,--no-as-needed -lmvec -Wl,--as-needed" \
%else
LDFLAGS="%{__global_ldflags}" \
%endif
OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
%{_bindir}/python$PY setup.py config_fc \
--fcompiler=gnu95 --noarch \
build
@ -146,8 +131,6 @@ for PY in %{python3_version}; do
done
%install
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
%py3_install
# Some files got ambiguous python shebangs, we fix them after everything else is done
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
@ -156,41 +139,24 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch
# check against the reference BLAS/LAPACK
export FLEXIBLAS=netlib
# default test timeout
TIMEOUT=500
# skip failing TestSchur, it needs to be fixed to account for different
# (but still valid) results from lapack >= 3.10
# see: https://github.com/Reference-LAPACK/lapack/issues/628
export PYTEST_ADDOPTS="-k 'not TestSchur'"
%ifarch s390x
# skip failing tests on s390x for now
export PYTEST_ADDOPTS="-k 'not TestSchur and \
export PYTEST_ADDOPTS="-k '\
not (TestNoData and test_nodata) and \
not test_solve_discrete_are'"
# some tests (namely test_logpdf_overflow) tend to run for a long time on s390x
TIMEOUT=1000
%endif
%ifarch aarch64 || ppc64le
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_solve_discrete_are'"
%endif
%ifarch x86_64
# skip also failing test_sygst for now
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_sygst'"
%endif
%ifarch i686 || armv7hl
# skip also test_cython_api: https://bugzilla.redhat.com/show_bug.cgi?id=2068496
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_sygst and not test_cython_api'"
not test_fortranfile_read_mixed_record and \
not test_kde_1d and \
not test_kde_1d_weighted and \
not test_kde_2d and \
not test_kde_2d_weighted and \
not test_gaussian_kde_subclassing and \
not test_gaussian_kde_covariance_caching and \
not test_kde_integer_input and \
not test_pdf_logpdf and \
not test_pdf_logpdf_weighted'"
%endif
pushd %{buildroot}/%{python3_sitearch}
%{pytest} --timeout=${TIMEOUT} scipy --numprocesses=auto
%{pytest} --timeout=500 scipy --numprocesses=auto
# Remove test remnants
rm -rf gram{A,B}
popd
@ -207,64 +173,6 @@ popd
%endif
%changelog
* Thu Jun 09 2022 Nikola Forró <nforro@redhat.com> - 1.8.1-1
- New upstream release 1.8.1
resolves: #2088437
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-3
- Skip test_cython_api also on armv7hl
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-2
- Disable pythran on armv7hl as well
* Mon Feb 07 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-1
- New upstream release 1.8.0
resolves: #2035126
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Dec 21 2021 Nikola Forró <nforro@redhat.com> - 1.7.3-1
- New upstream release 1.7.3
resolves: #1988883
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jul 14 2021 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-2
- Use the optional Pythran build dependency
* Wed Jun 23 2021 Nikola Forró <nforro@redhat.com> - 1.7.0-1
- New upstream release 1.7.0
resolves: #1953422
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.2-4
- Rebuilt for Python 3.10
* Fri Apr 23 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-3
- Remove RPATH from certain shared object files
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 1.6.2-2
- Rebuilt for removed libstdc++ symbol (#1937698)
* Thu Mar 25 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-1
- New upstream release 1.6.2
resolves: #1942896
* Thu Feb 18 2021 Nikola Forró <nforro@redhat.com> - 1.6.1-1
- New upstream release 1.6.1
resolves: #1929994
* Wed Feb 03 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-3
- Increase test timeout on s390x
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-1
- New upstream release 1.6.0
resolves: #1906692
* Wed Nov 25 2020 Nikola Forró <nforro@redhat.com> - 1.5.4-2
- Skip factorial() float tests on Python 3.10
resolves: #1898157

View File

@ -0,0 +1,47 @@
From ea0a77cf8761a8b8636b93314139ed0fc0a9d1db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Wed, 30 Sep 2020 11:44:25 +0200
Subject: [PATCH] TST: make a couple of tests expected to fail on 32-bit
architectures
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In TestConstructUtils.test_concatenate_int32_overflow
and test_nnz_overflow, on a 32-bit architecture, in case
check_free_memory() passes, ValueError is raised on an attempt
to create a numpy array too large for a 32-bit architecture.
Signed-off-by: Nikola Forró <nforro@redhat.com>
---
scipy/sparse/tests/test_construct.py | 1 +
scipy/sparse/tests/test_sparsetools.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/scipy/sparse/tests/test_construct.py b/scipy/sparse/tests/test_construct.py
index 3a882c6cc..5a2b92667 100644
--- a/scipy/sparse/tests/test_construct.py
+++ b/scipy/sparse/tests/test_construct.py
@@ -378,6 +378,7 @@ class TestConstructUtils(object):
excinfo.match(r'Got blocks\[0,1\]\.shape\[0\] == 1, expected 2')
@pytest.mark.slow
+ @pytest.mark.xfail_on_32bit("Can't create large array for test")
def test_concatenate_int32_overflow(self):
""" test for indptr overflow when concatenating matrices """
check_free_memory(30000)
diff --git a/scipy/sparse/tests/test_sparsetools.py b/scipy/sparse/tests/test_sparsetools.py
index 0c208ef44..e95df1ba0 100644
--- a/scipy/sparse/tests/test_sparsetools.py
+++ b/scipy/sparse/tests/test_sparsetools.py
@@ -61,6 +61,7 @@ def test_regression_std_vector_dtypes():
@pytest.mark.slow
+@pytest.mark.xfail_on_32bit("Can't create large array for test")
def test_nnz_overflow():
# Regression test for gh-7230 / gh-7871, checking that coo_todense
# with nnz > int32max doesn't overflow.
--
2.26.2

View File

@ -0,0 +1,40 @@
From eabd8ea25fe291665f37fd069a1c574cd30d12cc Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Wed, 25 Nov 2020 11:41:15 +0100
Subject: [PATCH] GH-13122: Skip factorial() float tests on Python 3.10
special.factorial() argument should be an array of integers.
On Python 3.10, math.factorial() reject float.
On Python 3.9, a DeprecationWarning is emitted.
A numpy array casts all integers to float if the array contains a
single NaN.
---
scipy/special/tests/test_basic.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py
index 9b7260e8435..e2ae29812a5 100644
--- a/scipy/special/tests/test_basic.py
+++ b/scipy/special/tests/test_basic.py
@@ -19,6 +19,7 @@
import itertools
import platform
+import sys
import numpy as np
from numpy import (array, isnan, r_, arange, finfo, pi, sin, cos, tan, exp,
@@ -1822,6 +1823,13 @@ def test_nan_inputs(self, x, exact):
result = special.factorial(x, exact=exact)
assert_(np.isnan(result))
+ # GH-13122: special.factorial() argument should be an array of integers.
+ # On Python 3.10, math.factorial() reject float.
+ # On Python 3.9, a DeprecationWarning is emitted.
+ # A numpy array casts all integers to float if the array contains a
+ # single NaN.
+ @pytest.mark.skipif(sys.version_info >= (3, 10),
+ reason="Python 3.10+ math.factorial() requires int")
def test_mixed_nan_inputs(self):
x = np.array([np.nan, 1, 2, 3, np.nan])
with suppress_warnings() as sup:

View File

@ -1 +1 @@
SHA512 (scipy-1.8.1.tar.gz) = f6fc71c209991fe82baa4b10d8ade0deb1057f6f5942a91dfb7ae45f3eb78a4535efa2861badf5e2d37239fa99dbd99de760aa7e4854b95991ade0263004e7ea
SHA512 (scipy-1.5.4.tar.gz) = d23f68911a8880f87767819750d4d175ba8f9c72fcb9b8080305ee65722c046d4485fde4f0c85cc53c46247dd99813afe675a38b3b0569a683ddc2c2e021b8fc