Compare commits

...

77 Commits

Author SHA1 Message Date
518da98229
Bootstrap for Python 3.13 (riscv64) and newer pybind11
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-07-12 16:59:46 +03:00
66f7094a83
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-07-12 16:58:20 +03:00
Python Maint
73d796b7bd Rebuilt for Python 3.13 2024-06-16 09:20:45 +02:00
Python Maint
9f96adbdff Bootstrap for Python 3.13 2024-06-08 16:33:15 +02:00
Miro Hrončok
d00b0e73ea Relax the pythran dependency 2024-06-08 11:32:06 +02:00
Karolina Surma
60f08266a7 Fix compatibility with Python 3.13+ 2024-05-29 10:35:37 +00:00
Pavel Simovec
f6692af6bf Remove python3-pooch optional dependency in RHEL 2024-05-28 15:35:26 +02:00
Pavel Simovec
340c10eb79 Disable test_minimize_constrained
The test started failing on ELN without any direct changes to scipy
2024-05-09 10:45:12 +02:00
Pavel Simovec
1b14aae342 Build without pythran in RHEL by default 2024-05-09 10:40:15 +02:00
Benjamin A. Beasley
a9212d458d Allow building with pybind11 2.12 2024-04-17 12:40:57 -04:00
Benjamin A. Beasley
cfc9239a24 Allow building with meson-python 0.16 2024-04-17 12:37:31 -04:00
28e51aacc7 Enable riscv64
Ignore failing tests and increase the test timeout.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2024-02-20 15:09:28 +00:00
Maxwell G
7d8ddcb20c
Use inline python mini script instead of tomcli 2024-02-02 18:51:43 +00:00
Maxwell G
f77aeeb563
Remove test timeouts
These are not pertinent to the RPM builds. We just want to know whether
the tests succeed or not, not how long they take on our builders.
2024-02-02 17:59:34 +00:00
Maxwell G
9dfef28e2e
Fix broken regex
This sed invocation uses extended regex syntax (i.e., un-escaped `|` and
parentheses capture groups) without the -E flag.
2024-02-02 02:48:13 +00:00
Maxwell G
8904f985ff
Use dynamic BuildRequires for python runtime dependencies 2024-02-02 02:42:54 +00:00
Miro Hrončok
a48fc60993 Skip fewer tests during build 2024-01-30 14:22:46 +01:00
Florian Weimer
eb436d61e9 Disable incompatible-pointer-types errors on i686 (#2258823) 2024-01-29 21:53:17 +01:00
Fedora Release Engineering
6d82f21e38 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 02:15:43 +00:00
Miro Hrončok
e8ff7ee04c Package LICENSES_bundled.txt 2024-01-16 20:13:35 +01:00
2246d23894
Ignore more failing tests on riscv64
[..]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[False-float32]
FAILED scipy/optimize/tests/test_milp.py::test_milp_timeout_16545[options0-Time limit reached. (HiGHS Status 13:]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[False-float64]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[False-complex64]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[False-complex128]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[True-float32]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[True-float64]
FAILED scipy/sparse/linalg/tests/test_propack.py::test_examples[True-complex128]
= 8 failed, 53296 passed, 3014 skipped, 225 xfailed, 11 xpassed, 141 warnings in 6690.40s (1:51:30) =
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.6avlQq (%check)
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-01 09:43:27 +02:00
Karolina Surma
5ba7407824 Remove the mentions about Pythran before adding options to meson-python 2023-11-30 16:05:54 +01:00
348cef7acc
Now enable pythran again
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-30 11:13:13 +02:00
e1a4f20910
Enable pythran again
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-30 10:26:06 +02:00
dab09452d1
Disable Pythran on riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-29 21:01:17 +02:00
35a25c615d
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-29 21:00:44 +02:00
Miro Hrončok
a78d2e4fe6 Enable build with Python 3.13+ 2023-11-29 12:27:36 +01:00
Miro Hrončok
9c7d8c9833 Fix the --without pythran build
Apparently, SCIPY_USE_PYTHRAN=0 only works with setuptools.
2023-11-29 12:27:36 +01:00
Benjamin A. Beasley
b3bae532eb Patch error collecting tests with pytest-xdist 2023-11-29 12:27:36 +01:00
Jerry James
c07c356d12 Remove unused BuildRequires 2023-11-29 12:27:31 +01:00
Jerry James
54f9f75c32 Reenable some tests that work again 2023-11-29 12:27:22 +01:00
Jerry James
0bfceb8704 Use pyproject macros instead of the deprecated py3 macros 2023-11-29 12:27:16 +01:00
6c3024f6b1
Enable riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-06 12:45:05 +02:00
Jerry James
64440ae7d2 Fix detection of open_memstream 2023-10-11 19:25:54 -06:00
Jerry James
a57187ad13 Pythran works on 32-bit architectures again 2023-10-11 19:25:34 -06:00
Jerry James
4b4527afc0 Disable LTO 2023-10-11 19:25:16 -06:00
Jerry James
c740f2b0fe Add Provides for bundled projects 2023-10-11 19:24:58 -06:00
Jerry James
1999f77f84 Convert License tag to SPDX 2023-10-11 19:24:43 -06:00
Jerry James
78288e18a6 Update to 1.11.3 2023-10-11 18:58:01 -06:00
Miro Hrončok
e098f22b88 Fix build failure with Cython 3 2023-07-31 18:00:28 +02:00
Pavel Simovec
13a6da947a Split test into separate subpackage 2023-07-20 09:20:33 +02:00
psimovec
e393801122 Update to 1.11.1 2023-07-14 18:03:06 +02:00
Python Maint
61875c9c3e Rebuilt for Python 3.12 2023-07-10 13:56:51 +02:00
Python Maint
bb35578728 Bootstrap for Python 3.12 2023-06-15 00:05:31 +02:00
Yaakov Selkowitz
27fa6ea118 Skip tests failing in ELN x86_64 builds 2023-05-29 23:27:30 -04:00
Yaakov Selkowitz
d3cbcc3c46 Avoid pytest-xdist dependency in RHEL builds
python-pytest-xdist is unwanted in RHEL due to its dependencies.
2023-05-23 19:32:36 -04:00
Pavel Šimovec
40898d6245 remove x86_64 linking issue workaround 2023-03-15 17:17:44 +01:00
Pavel Šimovec
91039a5990 update to 1.10.1 2023-02-21 11:26:49 +01:00
Pavel Šimovec
d0ec83d5c0 get rid of %ifarch a||b 2023-02-21 10:22:50 +01:00
Pavel Šimovec
f3a313924c Update to 1.10.0 & add the optional python3-pooch dependency 2023-02-06 16:53:37 +01:00
Fedora Release Engineering
db93ffb650 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 02:48:02 +00:00
Lumir Balhar
fdb9072f4e Switch from pathfix.py to %py3_shebang_fix
For more info see https://fedoraproject.org/wiki/Changes/Python3.12#pathfix.py_tool_will_be_removed
2022-11-01 07:19:09 +01:00
Fedora Release Engineering
ee272618a8 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 08:10:14 +00:00
Mamoru TASAKA
f824e735d7 Fix linalg.lapack syevr segfault (#2099102) 2022-07-03 16:24:35 +09:00
Python Maint
58539acd90 Rebuilt for Python 3.11 2022-06-17 13:25:12 +02:00
Miro Hrončok
6bbf5c100b Add more timeout on power and arm 2022-06-14 16:13:31 +02:00
Python Maint
ad63c1ac47 Bootstrap for Python 3.11 2022-06-14 13:50:32 +02:00
Python Maint
633c962bef Rebuilt for Python 3.11 2022-06-14 12:08:50 +02:00
Nikola Forró
bd4e64917c New upstream release 1.8.1
- resolves: #2088437
2022-06-10 11:29:38 +02:00
Nikola Forró
cb4c1a5648 Skip test_cython_api also on armv7hl 2022-03-26 17:01:55 +01:00
Nikola Forró
fe57db6f7b Disable pythran on armv7hl as well 2022-03-26 09:16:47 +01:00
Nikola Forró
a59f9627e2 New upstream release 1.8.0
- resolves: #2035126
2022-03-25 16:35:04 +01:00
Fedora Release Engineering
b637c5c738 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 00:29:31 +00:00
Nikola Forró
568f7abb7e New upstream release 1.7.3
- resolves: #1988883
2021-12-21 23:41:09 +01:00
Fedora Release Engineering
b4deb96dca - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 17:11:24 +00:00
Miro Hrončok
cc3283a748 Actually enable Pythran, and fix it on 32bit arches 2021-07-18 23:53:11 +02:00
Miro Hrončok
3ad0fb3b96 Use the optional Pythran build dependency 2021-07-15 12:51:44 +02:00
Nikola Forró
b7171384cb New upstream release 1.7.0
- resolves: #1953422
2021-06-24 11:54:10 +02:00
Python Maint
ae9e1e7328 Rebuilt for Python 3.10 2021-06-04 10:11:34 +02:00
Miro Hrončok
7151af7d31 Use a bigger hammer to make this build for the Python 3.10 rebuild
See https://bugzilla.redhat.com/show_bug.cgi?id=1959353 for details

- skip test_solve_discrete_are on s390x and aarch64
- don't even attempt to run tests on ppc64le, deselecting them just makes different tests crash
2021-06-03 10:56:12 +02:00
Nikola Forró
bf12251ecc Remove RPATH from certain shared object files 2021-04-23 18:47:32 +02:00
Jonathan Wakely
26e3a4a412 Rebuilt for removed libstdc++ symbol (#1937698) 2021-03-30 19:39:57 +01:00
Nikola Forró
0a4506f8b7 New upstream release 1.6.2
- resolves: #1942896
2021-03-25 15:03:36 +01:00
Nikola Forró
ddfc0d2225 New upstream release 1.6.1
- resolves: #1929994
2021-02-18 14:14:58 +01:00
Nikola Forró
fad1b115d2 Increase test timeout on s390x 2021-02-03 14:27:19 +01:00
Fedora Release Engineering
586cf8ee5c - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 20:04:18 +00:00
Nikola Forró
0ab886147a New upstream release 1.6.0
- resolves: #1906692
2021-01-14 18:56:12 +01:00
6 changed files with 417 additions and 162 deletions

11
.gitignore vendored
View File

@ -32,3 +32,14 @@ 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
/scipy-1.10.0.tar.gz
/scipy-1.10.1.tar.gz
/scipy-1.11.1.tar.gz
/scipy-1.11.3.tar.gz

28
19443.patch Normal file
View File

@ -0,0 +1,28 @@
From 28413806316049c09bb4b0182f652cce0ba82a50 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 27 Oct 2023 16:47:37 -0400
Subject: [PATCH] TST: Fix #19442 minimally
Use a sorted version of the set REAL_DTYPES to parameterize
test_b_orthonormalize.
---
scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
index c17d37051fca..fd6f166dc62d 100644
--- a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
+++ b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
@@ -101,9 +101,9 @@ def test_MikotaPair():
@pytest.mark.parametrize("n", [50])
@pytest.mark.parametrize("m", [1, 2, 10])
-@pytest.mark.parametrize("Vdtype", REAL_DTYPES)
-@pytest.mark.parametrize("Bdtype", REAL_DTYPES)
-@pytest.mark.parametrize("BVdtype", REAL_DTYPES)
+@pytest.mark.parametrize("Vdtype", sorted(REAL_DTYPES, key=str))
+@pytest.mark.parametrize("Bdtype", sorted(REAL_DTYPES, key=str))
+@pytest.mark.parametrize("BVdtype", sorted(REAL_DTYPES, key=str))
def test_b_orthonormalize(n, m, Vdtype, Bdtype, BVdtype):
"""Test B-orthonormalization by Cholesky with callable 'B'.
The function '_b_orthonormalize' is key in LOBPCG but may

View File

@ -1,6 +1,28 @@
%global _without_pythran 1
# 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.
%if 0%{?rhel}
%bcond_with pythran
%bcond_with pooch
%else
%bcond_without pythran
%bcond_without pooch
%endif
# The code is not safe to build with LTO
%global _lto_cflags %{nil}
%ifarch %{ix86}
# On i686, there is a confusion whether Fortran INTEGER should be
# translated as int or long.
# <https://github.com/scipy/scipy/issues/19993>
%global build_type_safety_c 2
%endif
# Set to pre-release version suffix if building pre-release, else %%{nil}
%global rcver %{nil}
@ -14,35 +36,47 @@
Summary: Scientific Tools for Python
Name: scipy
Version: 1.5.4
Release: 2%{?dist}
Version: 1.11.3
Release: 13.0.riscv64%{?dist}
# BSD -- whole package except:
# Boost -- scipy/special/cephes/scipy_iv.c
# Public Domain -- scipy/odr/__odrpack.c
License: BSD and Boost and Public Domain
# BSD-3-Clause -- whole package except:
# BSD-2-Clause -- scipy/_lib/_pep440.py
# scipy/_lib/decorator.py
# scipy/optimize/lbfgsb_src
# scipy/special/_ellip_harm.pxd
# MIT -- scipy/cluster/_optimal_leaf_ordering.pyx
# scipy/io/_idl.py
# scipy/linalg/_basic.py (in part)
# scipy/optimize/_highs
# scipy/optimize/_lbfgsb_py.py
# scipy/optimize/_tnc.py
# scipy/optimize/_trlib
# scipy/optimize/tnc
# scipy/special/Faddeeva.{cc,hh}
# BSL-1.0 -- scipy/_lib/boost_math
# scipy/special/cephes
# Boehm-GC -- scipy/sparse/linalg/_dsolve/SuperLU
# Qhull -- scipy/spatial/qhull_src
# LicenseRef-Fedora-Public-Domain -- scipy/odr/__odrpack.c
License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 AND Boehm-GC AND Qhull AND LicenseRef-Fedora-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
# TST: Fix #19442 minimally
# https://github.com/scipy/scipy/pull/19443
#
# Fixes:
#
# BUG: Error collecting tests due to inconsistent parameterization order in
# test_b_orthonormalize
# https://github.com/scipy/scipy/issues/19442
Patch: https://github.com/scipy/scipy/pull/19443.patch
BuildRequires: fftw-devel, suitesparse-devel
BuildRequires: %{blaslib}-devel
BuildRequires: gcc-gfortran, swig, gcc-c++
BuildRequires: qhull-devel
BuildRequires: /usr/bin/pathfix.py
BuildRequires: gcc-gfortran, gcc-c++
BuildRequires: pybind11-devel
BuildRequires: python3-pybind11 >= 2.4.0
BuildRequires: python3-numpy, python3-devel, python3-numpy-f2py
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
BuildRequires: python3-pytest
BuildRequires: python3-pytest-xdist
BuildRequires: python3-pytest-timeout
BuildRequires: python3-devel, python3-numpy-f2py
%if %{with doc}
BuildRequires: python3-sphinx
@ -66,7 +100,23 @@ leading scientists and engineers.}
%package -n python3-scipy
Summary: Scientific Tools for Python
Requires: python3-numpy, python3-f2py
%{?python_provide:%python_provide python3-scipy}
%if %{with pooch}
Requires: python3-pooch
%endif
Provides: bundled(arpack) = 3.3.0
Provides: bundled(biasedurn)
Provides: bundled(boost-math)
Provides: bundled(coin-or-HiGHS) = 1.2
Provides: bundled(Faddeeva)
Provides: bundled(id)
Provides: bundled(l-bfgs-b) = 3.0
Provides: bundled(LAPJVsp)
Provides: bundled(python3-decorator) = 4.0.5
Provides: bundled(python3-pep440)
Provides: bundled(python3-pypocketfft) = bf2c431c21213b7c5e23c2f542009b0bd3ec1445
Provides: bundled(qhull) = 2019.1
Provides: bundled(SuperLU) = 5.2.0
Provides: bundled(unuran) = 1.8.1
%description -n python3-scipy %_description
%if %{with doc}
@ -77,94 +127,195 @@ Requires: python3-scipy = %{version}-%{release}
HTML documentation for Scipy
%endif
%package -n python3-scipy-tests
Summary: Scientific Tools for Python - test files
Requires: python3-scipy = %{version}-%{release}
Requires: python3-pytest
%description -n python3-scipy-tests
Scipy test files
%prep
%autosetup -p1 -n %{name}-%{version}%{?rcver}
cat > site.cfg << EOF
[amd]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse
amd_libs = amd
%if %{without pythran}
# Remove pythran dependency if not explicitly required
sed -i '/pythran/d' pyproject.toml
%else
# Relax it otherwise
sed -i 's/pythran>=0.12.0,<0.15.0/pythran>=0.12.0/' pyproject.toml
%endif
%if %{without pooch}
sed -i '/pooch/d' pyproject.toml
%endif
[umfpack]
library_dirs = %{_libdir}
include_dirs = /usr/include/suitesparse
umfpack_libs = umfpack
cat >> pyproject.toml << EOF
[openblas]
libraries = %{blaslib}%{blasvar}
library_dirs = %{_libdir}
[tool.meson-python.args]
setup = ['-Dblas=%{blaslib}%{blasvar}', '-Dlapack=%{blaslib}%{blasvar}'%{!?with_pythran:, '-Duse-pythran=false'}]
EOF
# Docs won't build unless the .dat files are specified here
sed -i 's/metadata = dict(/metadata = dict(package_data={"": ["*.dat"]},/' setup.py
# Enable build with Python 3.13+
# Upstream only allows Python pre-releases in git HEAD, not in releases.
# However in Fedora, we actively build packages with Python pre-releases very soon.
sed -i 's/requires-python = ">=3.9,<3.13"/requires-python = ">=3.9"/' pyproject.toml
# remove bundled numpydoc
rm doc/sphinxext -r
# Docs won't build unless the .dat files are specified here
sed -i 's/metadata = dict(/metadata = dict(package_data={"": ["*.dat"]},/' _setup.py
rm $(grep -rl '/\* Generated by Cython') PKG-INFO
%build
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" \
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
FFLAGS="$RPM_OPT_FLAGS -fPIC -fallow-argument-mismatch" \
%else
FFLAGS="$RPM_OPT_FLAGS -fPIC" \
%endif
OPENBLAS=%{_libdir} \
FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
%{_bindir}/python$PY setup.py config_fc \
--fcompiler=gnu95 --noarch \
build
# numpy no longer contains a copy of distutils
for f in $(grep -Frl numpy.distutils); do
sed -i.orig 's/numpy\.\(distutils\)/\1/g' $f
touch -r $f.orig $f
rm $f.orig
done
%if %{with doc}
# Do not do benchmarking, coverage, or timeout testing for RPM builds
sed -Ei '/^[[:blank:]]*"(asv|pytest-cov|pytest-timeout)"/d' pyproject.toml
# No scikit-umfpack in Fedora
sed -i '/^[[:blank:]]*"scikit-umfpack"/d' pyproject.toml
# No pytest-xdist in RHEL
%if 0%{?rhel}
sed -i '/^[[:blank:]]*"pytest-xdist"/d' pyproject.toml
%endif
# Loosen the lower bound on numpy
sed -i "/numpy.*python_version=='3.12'/s/1\.26\.0/1\.24\.4/" pyproject.toml
# Loosen the upper bound on meson-python
sed -i '/meson-python/s/0\.15\.0/0\.17\.0/' pyproject.toml
# Loosen the upper bound on Cython
sed -i '/Cython/s/3\.0/3\.1/' pyproject.toml
# Loosen the upper bound on pybind11
sed -i '/pybind11/s/2\.11\.1/2.14.0/' pyproject.toml
# Work around failure to detect open_memstream. In glibc, open_memstream is
# not a real function. It is a weak alias to __open_memstream.
sed -i "s/\('has_openmemstream', \)'0'/\1'1'/" scipy/_lib/meson.build
# meson-python does not implement the prepare_metadata_for_build_wheel hook :(.
# Instead of using -w and compiling the wheel, an expensive process, twice
# (once to extract metadata, one for the final package), we can write the
# static deps from pyproject.toml to a file, and use that with %%pyproject_buildrequires.
#
# See https://github.com/mesonbuild/meson-python/issues/236 for more discussion.
# This could use tomcli, but we want to avoid pulling extra dependencies into ELN/RHEL.
python3 -c '
import tomllib
from pathlib import Path
with open("pyproject.toml", "rb") as fp:
data = tomllib.load(fp)
Path("_install-requirements.txt").write_text("\n".join(data["project"]["dependencies"]))
Path("_test-requirements.txt").write_text("\n".join(data["project"]["optional-dependencies"]["test"]))
'
%generate_buildrequires
%pyproject_buildrequires -R _install-requirements.txt _test-requirements.txt
%build
%pyproject_wheel
%if %{with doc}
for PY in %{python3_version}; do
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
%endif
%install
%py3_install
%pyproject_install
%pyproject_save_files scipy
# Some files got ambiguous python shebangs, we fix them after everything else is done
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
%py3_shebang_fix %{buildroot}%{python3_sitearch}
# Fix executable bits
chmod 0755 %{buildroot}%{python3_sitearch}/scipy/sparse/linalg/_isolve/tests/test_gcrotmk.py
%check
# check against the reference BLAS/LAPACK
export FLEXIBLAS=netlib
# TestDatasets try to download from the internet
# test_decorator relies on an exact string output from docstrings which is newly stripped in Python 3.13
# reported upstream: https://github.com/scipy/scipy/issues/19572
SKIP_ALL="not TestDatasets and \
not test_decorator"
export PYTEST_ADDOPTS="-k '$SKIP_ALL'"
%ifarch aarch64
# TestConstructUtils::test_concatenate_int32_overflow is flaky on aarch64
export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
not test_concatenate_int32_overflow'"
%endif
%ifarch s390x
# skip failing tests on s390x for now
export PYTEST_ADDOPTS="-k '\
not (TestNoData and test_nodata) and \
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'"
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353
export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
not test_distance_transform_cdt05'"
%endif
%ifarch x86_64
%if 0%{?rhel}
# test_minimize_constrained started failing on ELN without any direct changes to scipy
export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
not test_gh7799 and \
not test_minimize_constrained'"
%endif
%endif
%ifarch i686
# https://github.com/scipy/scipy/issues/17213
export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
not test_examples and \
not test_shifts and \
not test_svdp'"
%endif
%ifarch riscv64
export PYTEST_ADDOPTS="-k '$SKIP_ALL and \
not TestSchur and \
not test_gejsv_general and \
not test_kendall_p_exact_large and \
not test_gejsv_edge_arguments and \
not test_gh12999 and \
not test_propack and \
not test_milp and \
not test_gejsv_NAG'"
%endif
pushd %{buildroot}/%{python3_sitearch}
%{pytest} --timeout=500 scipy --numprocesses=auto
# Ignoring the datasets tests as we don't have the optional pooch
# dependency on RHEL.
%{pytest} %{!?with_pooch:--ignore=scipy/datasets/tests/test_data.py} scipy %{?!rhel:--numprocesses=auto}
# Remove test remnants
rm -rf gram{A,B}
rm -rf .pytest_cache
popd
%files -n python3-scipy
%doc LICENSE.txt
%{python3_sitearch}/scipy/
%{python3_sitearch}/*.egg-info
%files -n python3-scipy -f %{pyproject_files}
%license LICENSE.txt LICENSES_bundled.txt
%exclude %{python3_sitearch}/scipy/*/tests/
%exclude %{python3_sitearch}/scipy/*/*/tests/
%exclude %{python3_sitearch}/scipy/*/*/*/tests/
%exclude %{python3_sitearch}/scipy/*/*/*/*/tests/
%files -n python3-scipy-tests
%{python3_sitearch}/scipy/*/tests/
%{python3_sitearch}/scipy/*/*/tests/
%{python3_sitearch}/scipy/*/*/*/tests/
%{python3_sitearch}/scipy/*/*/*/*/tests/
%if %{with doc}
%files -n python3-scipy-doc
@ -173,6 +324,158 @@ popd
%endif
%changelog
* Fri Jul 12 2024 David Abdurachmanov <davidlt@rivosinc.com> - 1.11.3-13.0.riscv64
- Bootstrap for Python 3.13 (riscv64)
- Allow building with pybind11 2.13
* Sun Jun 16 2024 Python Maint <python-maint@redhat.com> - 1.11.3-13
- Rebuilt for Python 3.13
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 1.11.3-12
- Bootstrap for Python 3.13
* Sat Jun 08 2024 Miro Hrončok <mhroncok@redhat.com> - 1.11.3-11
- Relax the pythran dependency
* Wed May 22 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-10
- Remove python3-pooch optional dependency from RHEL
* Thu May 02 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-9
- Build without pythran in RHEL by default
* Wed Apr 17 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.11.3-8
- Allow building with meson-python 0.16
- Allow building with pybind11 2.12
* Fri Feb 02 2024 Maxwell G <maxwell@gtmx.me> - 1.11.3-7
- Use dynamic BuildRequires for python runtime dependencies
* Tue Jan 30 2024 Miro Hrončok <mhroncok@redhat.com> - 1.11.3-6
- Skip fewer tests during build
* Mon Jan 29 2024 Florian Weimer <fweimer@redhat.com> - 1.11.3-5
- Disable incompatible-pointer-types errors on i686 (#2258823)
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Nov 30 2023 Karolina Surma <ksurma@redhat.com> - 1.11.3-3
- Fix the build without pythran
* Wed Nov 01 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.11.3-2
- Patch error collecting tests with pytest-xdist
* Wed Oct 11 2023 Jerry James <loganjerry@gmail.com> - 1.11.3-1
- New upstream release 1.11.3
resolves: #2211813
- Convert License tag to SPDX
- Add Provides for bundled projects
- Disable LTO
- Pythran works on 32-bit architectures again
- Fix detection of open_memstream
- Use pyproject macros instead of the deprecated py3 macros
- Reenable some tests that work again
- Remove unused BuildRequires
* Wed Jul 12 2023 psimovec <psimovec@redhat.com> - 1.11.1-1
- New upstream release 1.11.1
resolves: #2211813
- Separate tests into subpackage python3-scipy-tests
* Mon Jul 10 2023 Python Maint <python-maint@redhat.com> - 1.10.1-5
- Rebuilt for Python 3.12
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1.10.1-4
- Bootstrap for Python 3.12
* Tue May 23 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.10.1-3
- Avoid pytest-xdist dependency in RHEL builds
* Wed Mar 15 2023 Pavel Šimovec <psimovec@redhat.com> - 1.10.1-2
- Remove workaround for linking issue on x86_64
- resolves: #2068530
* Wed Feb 22 2023 Pavel Šimovec <psimovec@redhat.com> - 1.10.1-1
- New upstream release 1.10.1
resolves: #2101172
- Use the optional python3-pooch dependency
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jul 3 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.8.1-5
- Fix linalg.lapack syevr segfault (#2099102)
* Fri Jun 17 2022 Python Maint <python-maint@redhat.com> - 1.8.1-4
- Rebuilt for Python 3.11
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-3
- Bootstrap for Python 3.11
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-2
- Rebuilt for Python 3.11
* 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

@ -1,47 +0,0 @@
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

@ -1,40 +0,0 @@
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.5.4.tar.gz) = d23f68911a8880f87767819750d4d175ba8f9c72fcb9b8080305ee65722c046d4485fde4f0c85cc53c46247dd99813afe675a38b3b0569a683ddc2c2e021b8fc
SHA512 (scipy-1.11.3.tar.gz) = 6491c4e479d9f4f02e677396a25ddca947a0dc6c009fc2ec34c658012a6224c0b535f14045bb011fbde9973ea987d184574ed64e6760c31798ec860eb0896fcf