CI: Simplify spec conditionals wrt Fedora 39 going EOL

(cherry picked from Fedora commit 665fd2456d)
This commit is contained in:
Miro Hrončok 2024-11-20 13:24:57 +01:00
parent 4c800c37a1
commit 39ab143d16
3 changed files with 6 additions and 6 deletions

View File

@ -10,8 +10,8 @@ BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
# Wekrzeug in Fedora 37 isn't compatible with our httpbin
%if 0%{?rhel} != 9
# Wekrzeug in Fedora and EL10+ isn't compatible with our httpbin
Patch: 0001-Fix-disabling-of-location-header-autocorrect-for-wer.patch
%endif
@ -61,7 +61,7 @@ sed -Ei 's/\bdef (test_(relative_)?redirect_(to_post|n_(equals_to|higher_than)_1
%if %{with tests}
%check
%if 0%{?fedora} < 40 && 0%{?rhel} < 10
%if 0%{?rhel} == 9
# this version of httpbin is not compatible with werkzeug 3+
%tox
%endif

View File

@ -1,7 +1,7 @@
Name: python-setuptools
# on the CI we test different version of setuptools on different Fedora versions
# don't package software like this in Fedora please
%if 0%{?fedora} || 0%{?rhel} >= 10
%if 0%{?rhel} != 9
Version: 67.7.2
%else
Version: 59.6.0
@ -14,7 +14,7 @@ URL: https://pypi.python.org/pypi/setuptools
Source: %{pypi_source setuptools %{version}}
# Patch from Fedora proper
%if 0%{?fedora} || 0%{?rhel} >= 10
%if 0%{?rhel} != 9
Patch: Remove-optional-or-unpackaged-test-deps.patch
%else
Patch: 0001-Remove-optional-or-unpackaged-test-deps.patch

View File

@ -37,7 +37,7 @@ sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \
# Drop the option for flaky
sed -i 's/--no-success-flaky-report//' pyproject.toml
# Hacky backport of https://src.fedoraproject.org/rpms/python-virtualenv/c/87b1f95664
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
%if 0%{?rhel} != 9
sed -i 's/_nonwrappers/_hookimpls/' tests/conftest.py
%endif