Build without pythran in RHEL by default

Resolves: RHEL-33955
This commit is contained in:
Pavel Simovec 2024-05-02 16:43:43 +02:00
parent 83455c9a9f
commit 157d02ddea

View File

@ -1,6 +1,15 @@
# without means enabled # without means enabled
%bcond_with doc %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 # The code is not safe to build with LTO
%global _lto_cflags %{nil} %global _lto_cflags %{nil}
@ -25,7 +34,7 @@
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Name: scipy Name: scipy
Version: 1.11.3 Version: 1.11.3
Release: 7%{?dist} Release: 8%{?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
@ -129,13 +138,15 @@ Scipy test files
%prep %prep
%autosetup -p1 -n %{name}-%{version}%{?rcver} %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 sed -i '/pythran/d' pyproject.toml
%endif
cat >> pyproject.toml << EOF cat >> pyproject.toml << EOF
[tool.meson-python.args] [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 EOF
# Enable build with Python 3.13+ # Enable build with Python 3.13+
@ -291,6 +302,10 @@ popd
%endif %endif
%changelog %changelog
* Thu May 02 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-8
- Build without pythran in RHEL by default
- Resolves: RHEL-33955
* Fri Apr 26 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-7 * Fri Apr 26 2024 Pavel Simovec <psimovec@redhat.com> - 1.11.3-7
- Fully remove pythran dependency - Fully remove pythran dependency
- Resolves: RHEL-33955 - Resolves: RHEL-33955