CI: Adjust spec conditionals for F35 EOL
Also, use %elif instead of a nested %if. Related: rhbz#2168193
This commit is contained in:
parent
6923c14ba5
commit
1a404c23b3
@ -46,20 +46,20 @@ cd ..
|
||||
|
||||
%check
|
||||
# Internal check for the value of %%{pyproject_build_lib}
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
||||
cd markupsafe-%{markupsafe_version}
|
||||
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
|
||||
%if 0%{?rhel} == 9
|
||||
for dir in . markupsafe-%{markupsafe_version} tldr-%{tldr_version}; do
|
||||
(cd $dir && test "%{pyproject_build_lib}" == "$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}):$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib)")
|
||||
done
|
||||
%else
|
||||
cd markupsafe-%{markupsafe_version}
|
||||
%if 0%{?fedora} == 36
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-%{python3_version}"
|
||||
%else
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
|
||||
%endif
|
||||
cd ../tldr-%{tldr_version}
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/tldr-%{tldr_version}/build/lib"
|
||||
cd ..
|
||||
%else
|
||||
for dir in . markupsafe-%{markupsafe_version} tldr-%{tldr_version}; do
|
||||
(cd $dir && test "%{pyproject_build_lib}" == "$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}):$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib)")
|
||||
done
|
||||
%endif
|
||||
|
||||
|
||||
|
@ -40,12 +40,9 @@ Summary: %{summary}
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9
|
||||
# Hack: We remove tests that are broken by OpenLDAP 2.5+
|
||||
# Don't do this in the regular Fedora package, please
|
||||
rm Tests/t_ldapobject.py Tests/t_cext.py Tests/t_edit.py Tests/t_ldap_sasl.py Tests/t_ldap_syncrepl.py Tests/t_slapdobject.py Tests/t_bind.py Tests/t_ldap_options.py Tests/t_ldap_schema_subentry.py
|
||||
%endif
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
@ -97,14 +94,12 @@ grep -E '/site-packages/__pycache__$' %{pyproject_files} && exit 1 || true
|
||||
grep -E '/site-packages/__pycache__/$' %{pyproject_files} && exit 1 || true
|
||||
|
||||
# Internal check for the value of %%{pyproject_build_lib} in an archful package
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
||||
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
|
||||
%else
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/build/lib.%{python3_platform}-%{python3_version}"
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?rhel} == 9
|
||||
test "%{pyproject_build_lib}" == "$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version})"
|
||||
%elif 0%{?fedora} == 36
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/build/lib.%{python3_platform}-%{python3_version}"
|
||||
%else
|
||||
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
|
||||
%endif
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ sed -Ei '/^(coverage)$/d' requirements-dev.txt
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%if 0%{?fedora} > 35 || 0%{?rhel} > 9
|
||||
%if 0%{?fedora} || 0%{?rhel} > 9
|
||||
# Internal check that license file was recognized correctly with hatchling 1.9.0+
|
||||
grep '^%%license' %{pyproject_files} > tested.license
|
||||
echo '%%license %{python3_sitelib}/userpath-%{version}.dist-info/licenses/LICENSE.txt' > expected.license
|
||||
|
@ -11,7 +11,7 @@ BuildArch: noarch
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
||||
%if 0%{?rhel} != 9
|
||||
# Internal check for our macros: test that we can install to a custom prefix
|
||||
BuildRequires: python3-rpm-macros >= 3.10-18
|
||||
%global _prefix /app
|
||||
@ -49,13 +49,13 @@ head -n1 %{buildroot}%{_bindir}/%{name}.py | grep -E '#!\s*%{python3}\s+%{py3_sh
|
||||
test ! -e %{buildroot}%{python3_sitelib}/*.dist-info/direct_url.json
|
||||
|
||||
# Internal check for the value of %%{pyproject_build_lib} in a noarch package
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
||||
test "%{pyproject_build_lib}" == "${PWD}/build/lib"
|
||||
%else
|
||||
%if 0%{?rhel} == 9
|
||||
test "%{pyproject_build_lib}" == "$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib)"
|
||||
%else
|
||||
test "%{pyproject_build_lib}" == "${PWD}/build/lib"
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
||||
%if 0%{?rhel} != 9
|
||||
# Internal check for custom prefix
|
||||
grep '^/usr' %{pyproject_files} && exit 1 || true
|
||||
grep '^/app' %{pyproject_files}
|
||||
|
Loading…
Reference in New Issue
Block a user