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