diff --git a/scipy.spec b/scipy.spec index 0d75d57..bc2b6d0 100644 --- a/scipy.spec +++ b/scipy.spec @@ -1,6 +1,15 @@ # 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 +%else +%bcond_without pythran +%endif + # The code is not safe to build with LTO %global _lto_cflags %{nil} @@ -25,7 +34,7 @@ Summary: Scientific Tools for Python Name: scipy Version: 1.11.3 -Release: 7%{?dist} +Release: 8%{?dist} # BSD-3-Clause -- whole package except: # BSD-2-Clause -- scipy/_lib/_pep440.py @@ -129,13 +138,15 @@ Scipy test files %prep %autosetup -p1 -n %{name}-%{version}%{?rcver} -# Remove pythran dependency +# Remove pythran dependency if not explicitly required +%if %{without pythran} sed -i '/pythran/d' pyproject.toml +%endif cat >> pyproject.toml << EOF [tool.meson-python.args] -setup = ['-Dblas=%{blaslib}%{blasvar}', '-Dlapack=%{blaslib}%{blasvar}', '-Duse-pythran=false'] +setup = ['-Dblas=%{blaslib}%{blasvar}', '-Dlapack=%{blaslib}%{blasvar}'%{!?with_pythran:, '-Duse-pythran=false'}] EOF # Enable build with Python 3.13+ @@ -291,6 +302,10 @@ popd %endif %changelog +* Thu May 02 2024 Pavel Simovec - 1.11.3-8 +- Build without pythran in RHEL by default +- Resolves: RHEL-33955 + * Fri Apr 26 2024 Pavel Simovec - 1.11.3-7 - Fully remove pythran dependency - Resolves: RHEL-33955