Remove python-pooch optional dependency from RHEL

Related: RHELMISC-5321
This commit is contained in:
Pavel Simovec 2024-05-30 11:11:23 +02:00
parent 157d02ddea
commit 37adc4b753

View File

@ -6,8 +6,10 @@
# but it is usually not available soon enough for new major Python versions. # but it is usually not available soon enough for new major Python versions.
%if 0%{?rhel} %if 0%{?rhel}
%bcond_with pythran %bcond_with pythran
%bcond_with pooch
%else %else
%bcond_without pythran %bcond_without pythran
%bcond_without pooch
%endif %endif
# The code is not safe to build with LTO # The code is not safe to build with LTO
@ -34,7 +36,7 @@
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Name: scipy Name: scipy
Version: 1.11.3 Version: 1.11.3
Release: 8%{?dist} Release: 9%{?dist}
# BSD-3-Clause -- whole package except: # BSD-3-Clause -- whole package except:
# BSD-2-Clause -- scipy/_lib/_pep440.py # BSD-2-Clause -- scipy/_lib/_pep440.py
@ -80,7 +82,9 @@ BuildRequires: python3-pytest-timeout
%if ! 0%{?rhel} %if ! 0%{?rhel}
BuildRequires: python3-pytest-xdist BuildRequires: python3-pytest-xdist
%endif %endif
%if %{with pooch}
BuildRequires: python3-pooch BuildRequires: python3-pooch
%endif
%if %{with doc} %if %{with doc}
BuildRequires: python3-sphinx BuildRequires: python3-sphinx
@ -142,6 +146,9 @@ Scipy test files
%if %{without pythran} %if %{without pythran}
sed -i '/pythran/d' pyproject.toml sed -i '/pythran/d' pyproject.toml
%endif %endif
%if %{without pooch}
sed -i '/pooch/d' pyproject.toml
%endif
cat >> pyproject.toml << EOF cat >> pyproject.toml << EOF
@ -276,7 +283,9 @@ not test_svdp'"
%endif %endif
pushd %{buildroot}/%{python3_sitearch} pushd %{buildroot}/%{python3_sitearch}
%{pytest} --timeout=${TIMEOUT} scipy %{?!rhel:--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} --timeout=${TIMEOUT} scipy %{?!rhel:--numprocesses=auto}
# Remove test remnants # Remove test remnants
rm -rf gram{A,B} rm -rf gram{A,B}
rm -rf .pytest_cache rm -rf .pytest_cache
@ -302,6 +311,10 @@ popd
%endif %endif
%changelog %changelog
* Tue May 28 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-9
- Remove python-pooch optional dependency from RHEL
- Related: RHELMISC-5321
* Thu May 02 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-8 * Thu May 02 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-8
- Build without pythran in RHEL by default - Build without pythran in RHEL by default
- Resolves: RHEL-33955 - Resolves: RHEL-33955