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