|
|
4f4a64 |
%global __python3 /usr/bin/python3.11
|
|
|
4f4a64 |
%global python3_pkgversion 3.11
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# Pythran is an optional build dependency.
|
|
|
4f4a64 |
# When used, it makes some modules faster,
|
|
|
4f4a64 |
# but it is usually not available soon enough for new major Python versions.
|
|
|
4f4a64 |
%bcond_with pythran
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# Set to pre-release version suffix if building pre-release, else %%{nil}
|
|
|
4f4a64 |
%global rcver %{nil}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
|
|
|
4f4a64 |
%global blaslib flexiblas
|
|
|
4f4a64 |
%global blasvar %{nil}
|
|
|
4f4a64 |
%else
|
|
|
4f4a64 |
%global blaslib openblas
|
|
|
4f4a64 |
%global blasvar p
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%global modname scipy
|
|
|
4f4a64 |
|
|
|
4f4a64 |
Summary: Scientific Tools for Python
|
|
|
4f4a64 |
Name: python%{python3_pkgversion}-scipy
|
|
|
4f4a64 |
Version: 1.10.0
|
|
|
4f4a64 |
Release: 1%{?dist}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# BSD -- whole package except:
|
|
|
4f4a64 |
# Boost -- scipy/special/cephes/scipy_iv.c
|
|
|
4f4a64 |
# Public Domain -- scipy/odr/__odrpack.c
|
|
|
4f4a64 |
License: BSD and Boost and Public Domain
|
|
|
4f4a64 |
Url: http://www.scipy.org/scipylib/index.html
|
|
|
4f4a64 |
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# Fix some test failures on 32 bits
|
|
|
4f4a64 |
# https://github.com/scipy/scipy/pull/17859
|
|
|
4f4a64 |
# https://github.com/scipy/scipy/pull/17931
|
|
|
4f4a64 |
Patch0: fix-32bit-test-failures.patch
|
|
|
4f4a64 |
|
|
|
4f4a64 |
BuildRequires: fftw-devel, suitesparse-devel
|
|
|
4f4a64 |
BuildRequires: %{blaslib}-devel
|
|
|
4f4a64 |
BuildRequires: gcc-gfortran, swig, gcc-c++
|
|
|
4f4a64 |
BuildRequires: qhull-devel
|
|
|
4f4a64 |
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-pybind11-devel
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-pybind11 >= 2.4.0
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-numpy, python%{python3_pkgversion}-devel, python%{python3_pkgversion}-numpy-f2py
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-Cython
|
|
|
4f4a64 |
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%if %{with pythran}
|
|
|
4f4a64 |
BuildRequires: pythran
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
Requires: python%{python3_pkgversion}-numpy, python%{python3_pkgversion}-f2py
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%global _description %{expand:
|
|
|
4f4a64 |
Scipy is open-source software for mathematics, science, and
|
|
|
4f4a64 |
engineering. The core library is NumPy which provides convenient and
|
|
|
4f4a64 |
fast N-dimensional array manipulation. The SciPy library is built to
|
|
|
4f4a64 |
work with NumPy arrays, and provides many user-friendly and efficient
|
|
|
4f4a64 |
numerical routines such as routines for numerical integration and
|
|
|
4f4a64 |
optimization. Together, they run on all popular operating systems, are
|
|
|
4f4a64 |
quick to install, and are free of charge. NumPy and SciPy are easy to
|
|
|
4f4a64 |
use, but powerful enough to be depended upon by some of the world's
|
|
|
4f4a64 |
leading scientists and engineers.}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%description %_description
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%prep
|
|
|
4f4a64 |
%autosetup -p1 -n %{modname}-%{version}%{?rcver}
|
|
|
4f4a64 |
cat > site.cfg << EOF
|
|
|
4f4a64 |
|
|
|
4f4a64 |
[amd]
|
|
|
4f4a64 |
library_dirs = %{_libdir}
|
|
|
4f4a64 |
include_dirs = /usr/include/suitesparse
|
|
|
4f4a64 |
amd_libs = amd
|
|
|
4f4a64 |
|
|
|
4f4a64 |
[umfpack]
|
|
|
4f4a64 |
library_dirs = %{_libdir}
|
|
|
4f4a64 |
include_dirs = /usr/include/suitesparse
|
|
|
4f4a64 |
umfpack_libs = umfpack
|
|
|
4f4a64 |
|
|
|
4f4a64 |
[openblas]
|
|
|
4f4a64 |
libraries = %{blaslib}%{blasvar}
|
|
|
4f4a64 |
library_dirs = %{_libdir}
|
|
|
4f4a64 |
EOF
|
|
|
4f4a64 |
|
|
|
4f4a64 |
rm $(grep -rl '/\* Generated by Cython') PKG-INFO
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%build
|
|
|
4f4a64 |
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
for PY in %{python3_pkgversion}; do
|
|
|
4f4a64 |
# Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611
|
|
|
4f4a64 |
env CFLAGS="$RPM_OPT_FLAGS -lm" \
|
|
|
4f4a64 |
FFLAGS="$RPM_OPT_FLAGS -fPIC -cpp" \
|
|
|
4f4a64 |
LDFLAGS="$RPM_LD_FLAGS -shared" \
|
|
|
4f4a64 |
%if 0%{?rhel} >= 9
|
|
|
4f4a64 |
%ifarch x86_64
|
|
|
4f4a64 |
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2068530
|
|
|
4f4a64 |
LDFLAGS="%{__global_ldflags} -Wl,--no-as-needed -lmvec -Wl,--as-needed" \
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
%{_bindir}/python$PY setup.py config_fc \
|
|
|
4f4a64 |
--fcompiler=gnu95 --noarch \
|
|
|
4f4a64 |
build
|
|
|
4f4a64 |
|
|
|
4f4a64 |
done
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%install
|
|
|
4f4a64 |
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%py3_install
|
|
|
4f4a64 |
# Some files got ambiguous python shebangs, we fix them after everything else is done
|
|
|
4f4a64 |
%py3_shebang_fix %{buildroot}%{python3_sitearch}
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%check
|
|
|
4f4a64 |
# check against the reference BLAS/LAPACK
|
|
|
4f4a64 |
export FLEXIBLAS=netlib
|
|
|
4f4a64 |
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# https://github.com/scipy/scipy/issues/17912
|
|
|
4f4a64 |
SKIP_ALL_ARCHS="\
|
|
|
4f4a64 |
not TestDatasets and \
|
|
|
4f4a64 |
not TestOde and \
|
|
|
4f4a64 |
not TestComplexOde and \
|
|
|
4f4a64 |
not TestVODECheckParameterUse and \
|
|
|
4f4a64 |
not TestZVODECheckParameterUse and \
|
|
|
4f4a64 |
not test_banded_ode_solvers and \
|
|
|
4f4a64 |
not test_examples[True-complex64]"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# skip also failing test_sygst for now
|
|
|
4f4a64 |
SKIP_X86_64="-k '$SKIP_ALL_ARCHS and \
|
|
|
4f4a64 |
not test_sygst'"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353
|
|
|
4f4a64 |
# TestConstructUtils::test_concatenate_int32_overflow is flaky on aarch64
|
|
|
4f4a64 |
SKIP_AARCH64="-k '$SKIP_ALL_ARCHS and \
|
|
|
4f4a64 |
not test_solve_discrete_are and \
|
|
|
4f4a64 |
not test_maxiter_worsening[lgmres] and \
|
|
|
4f4a64 |
not test_concatenate_int32_overflow'"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# Those tests fail on koji/brew for ppc64le but pass
|
|
|
4f4a64 |
# locally for that architecture
|
|
|
4f4a64 |
SKIP_PPC64LE="-k '$SKIP_ALL_ARCHS and \
|
|
|
4f4a64 |
not TestFFTConvolve and \
|
|
|
4f4a64 |
not TestDoubleFFT and \
|
|
|
4f4a64 |
not TestSingleFFT and \
|
|
|
4f4a64 |
not TestDoubleIFFT and \
|
|
|
4f4a64 |
not TestSingleIFFT and \
|
|
|
4f4a64 |
not test_tpsv and \
|
|
|
4f4a64 |
not TestLinear and \
|
|
|
4f4a64 |
not test_various_drivers_standard and \
|
|
|
4f4a64 |
not test_Mx1_economic and \
|
|
|
4f4a64 |
not test_hegst and \
|
|
|
4f4a64 |
not test_tpqrt_tpmqrt and \
|
|
|
4f4a64 |
not test_pteqr and \
|
|
|
4f4a64 |
not test_pptrs_pptri_pptrf_ppsv_ppcon and \
|
|
|
4f4a64 |
not test_against_numpy_convolve and \
|
|
|
4f4a64 |
not test_convolve_method and \
|
|
|
4f4a64 |
not test_rank1 and \
|
|
|
4f4a64 |
not test_splu_smoketest and \
|
|
|
4f4a64 |
not test_spilu_smoketest and \
|
|
|
4f4a64 |
not test_threads_parallel and \
|
|
|
4f4a64 |
not test_hermitian and \
|
|
|
4f4a64 |
not test_convergence and \
|
|
|
4f4a64 |
not test_precond_dummy and \
|
|
|
4f4a64 |
not test_x0_equals_Mb and \
|
|
|
4f4a64 |
not test_svdp and \
|
|
|
4f4a64 |
not test_examples'"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353
|
|
|
4f4a64 |
SKIP_S390X="-k '$SKIP_ALL_ARCHS and \
|
|
|
4f4a64 |
not test_solve_discrete_are and \
|
|
|
4f4a64 |
not test_maxiter_worsening[lgmres] and \
|
|
|
4f4a64 |
not TestInterop and \
|
|
|
4f4a64 |
not TestSplder and \
|
|
|
4f4a64 |
not test_dblint and \
|
|
|
4f4a64 |
not TestUnivariateSpline and \
|
|
|
4f4a64 |
not TestLSQBivariateSpline and \
|
|
|
4f4a64 |
not TestPPoly and \
|
|
|
4f4a64 |
not TestLevyStable'"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
# skip also test_cython_api: https://bugzilla.redhat.com/show_bug.cgi?id=2068496
|
|
|
4f4a64 |
# https://github.com/scipy/scipy/issues/17213
|
|
|
4f4a64 |
SKIP_32BIT="-k '$SKIP_ALL_ARCHS and \
|
|
|
4f4a64 |
not test_sygst and \
|
|
|
4f4a64 |
not test_cython_api and \
|
|
|
4f4a64 |
not test_examples and \
|
|
|
4f4a64 |
not test_shifts and \
|
|
|
4f4a64 |
not test_mu and \
|
|
|
4f4a64 |
not test_sum and \
|
|
|
4f4a64 |
not test_svdp and \
|
|
|
4f4a64 |
not test_resiliency_all_32 and \
|
|
|
4f4a64 |
not test_resiliency_random[TestCSC-test_sum_dtype] and \
|
|
|
4f4a64 |
not test_x0_equals_Mb[bicgstab] and \
|
|
|
4f4a64 |
not test_gh12218'"
|
|
|
4f4a64 |
|
|
|
4f4a64 |
export PYTEST_ADDOPTS="-k '$SKIP_ALL_ARCHS'"
|
|
|
4f4a64 |
# default test timeout
|
|
|
4f4a64 |
TIMEOUT=500
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch x86_64
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_X86_64
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch aarch64
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_AARCH64
|
|
|
4f4a64 |
TIMEOUT=1000
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch ppc64le
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_PPC64LE
|
|
|
4f4a64 |
TIMEOUT=1000
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch s390x
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_S390X
|
|
|
4f4a64 |
TIMEOUT=1000
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch armv7hl
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_32BIT
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%ifarch i686
|
|
|
4f4a64 |
export PYTEST_ADDOPTS=$SKIP_32BIT
|
|
|
4f4a64 |
%endif
|
|
|
4f4a64 |
|
|
|
4f4a64 |
pushd %{buildroot}/%{python3_sitearch}
|
|
|
4f4a64 |
# Ignoring the datasets tests as we don't have the optional pooch
|
|
|
4f4a64 |
# dependency on RHEL.
|
|
|
4f4a64 |
%{pytest} --ignore=scipy/datasets/tests/test_data.py scipy
|
|
|
4f4a64 |
# Remove test remnants
|
|
|
4f4a64 |
rm -rf gram{A,B}
|
|
|
4f4a64 |
popd
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%files -n python%{python3_pkgversion}-scipy
|
|
|
4f4a64 |
%doc LICENSE.txt
|
|
|
4f4a64 |
%{python3_sitearch}/scipy/
|
|
|
4f4a64 |
%{python3_sitearch}/*.egg-info
|
|
|
4f4a64 |
|
|
|
4f4a64 |
%changelog
|
|
|
4f4a64 |
* Sun Feb 19 2023 Charalampos Stratakis <cstratak@redhat.com> - 1.10.0-1
|
|
|
4f4a64 |
- Update to 1.10.0
|
|
|
4f4a64 |
|
|
|
4f4a64 |
* Thu Dec 01 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.8.1-1
|
|
|
4f4a64 |
- Initial package
|
|
|
4f4a64 |
- Fedora contributions by:
|
|
|
4f4a64 |
Antonio Trande <anto.trande@gmail.com>
|
|
|
4f4a64 |
Bill Nottingham <notting@fedoraproject.org>
|
|
|
4f4a64 |
Björn Esser <me@besser82.io>
|
|
|
4f4a64 |
Charalampos Stratakis <cstratak@redhat.com>
|
|
|
4f4a64 |
Christian Dersch <lupinix@mailbox.org>
|
|
|
4f4a64 |
David Malcolm <dmalcolm@redhat.com>
|
|
|
4f4a64 |
Deji Akingunola <deji@fedoraproject.org>
|
|
|
4f4a64 |
Dennis Gilmore <dennis@ausil.us>
|
|
|
4f4a64 |
Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
4f4a64 |
Ignacio Vazquez-Abrams <ivazquez@fedoraproject.org>
|
|
|
4f4a64 |
Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
4f4a64 |
Iñaki Úcar <iucar@fedoraproject.org>
|
|
|
4f4a64 |
Jef Spaleta <jspaleta@fedoraproject.org>
|
|
|
4f4a64 |
Jesse Keating <jkeating@fedoraproject.org>
|
|
|
4f4a64 |
Jitka Plesnikova <jplesnik@redhat.com>
|
|
|
4f4a64 |
Jonathan Wakely <jwakely@redhat.com>
|
|
|
4f4a64 |
Jon Ciesla <limb@fedoraproject.org>
|
|
|
4f4a64 |
Kalev Lember <klember@redhat.com>
|
|
|
4f4a64 |
Kevin Fenzi <kevin@scrye.com>
|
|
|
4f4a64 |
Lumir Balhar <lbalhar@redhat.com>
|
|
|
4f4a64 |
Mamoru TASAKA <mtasaka@fedoraproject.org>
|
|
|
4f4a64 |
Marcel Plch <mplch@redhat.com>
|
|
|
4f4a64 |
Miro Hrončok <miro@hroncok.cz>
|
|
|
4f4a64 |
Nikola Forró <nforro@redhat.com>
|
|
|
4f4a64 |
Nils Philippsen <nils@redhat.com>
|
|
|
4f4a64 |
Orion Poplawski <orion@nwra.com>
|
|
|
4f4a64 |
Pavel Šimovec <psimovec@redhat.com>
|
|
|
4f4a64 |
Peter Robinson <pbrobinson@fedoraproject.org>
|
|
|
4f4a64 |
Petr Viktorin <pviktori@redhat.com>
|
|
|
4f4a64 |
Robert Kuska <rkuska@redhat.com>
|
|
|
4f4a64 |
Than Ngo <than@redhat.com>
|
|
|
4f4a64 |
Thomas Spura <thomas.spura@gmail.com>
|
|
|
4f4a64 |
Tomas Tomecek <ttomecek@redhat.com>
|
|
|
4f4a64 |
Toshio Kuratomi <toshio@fedoraproject.org>
|
|
|
4f4a64 |
Troy Dawson <tdawson@fedoraproject.org>
|
|
|
4f4a64 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|