diff --git a/tests/fake-requirements.spec b/tests/fake-requirements.spec index bc86033..795c49b 100644 --- a/tests/fake-requirements.spec +++ b/tests/fake-requirements.spec @@ -23,5 +23,8 @@ EOF %check pip show toml click -! pip show setuptools -! pip show wheel +%if 0%{?fedora} > 34 || 0%{?rhel} > 9 +# On F34, python3-devel requires (python3-setuptools if rpm-build) +pip show setuptools && exit 1 || true +%endif +pip show wheel && exit 1 || true diff --git a/tests/python-entrypoints.spec b/tests/python-entrypoints.spec index aa6d2d9..2591ed0 100644 --- a/tests/python-entrypoints.spec +++ b/tests/python-entrypoints.spec @@ -42,8 +42,8 @@ Summary: %{summary} %check # Internal check: Top level __pycache__ is never owned -! grep -E '/__pycache__$' %{pyproject_files} -! grep -E '/__pycache__/$' %{pyproject_files} +grep -E '/__pycache__$' %{pyproject_files} && exit 1 || true +grep -E '/__pycache__/$' %{pyproject_files} && exit 1 || true grep -F '/__pycache__/' %{pyproject_files} diff --git a/tests/python-isort.spec b/tests/python-isort.spec index 2881fa5..069e3d3 100644 --- a/tests/python-isort.spec +++ b/tests/python-isort.spec @@ -47,7 +47,7 @@ test -d %{buildroot}%{python3_sitelib}/%{modname}/ test -d %{buildroot}%{python3_sitelib}/%{modname}-%{version}.dist-info/ # Internal check that executables are not present when +auto was not used with %%pyproject_save_files -! grep -F %{_bindir}/%{modname} %{pyproject_files} +grep -F %{_bindir}/%{modname} %{pyproject_files} && exit 1 || true %files -n python3-%{modname} -f %{pyproject_files} diff --git a/tests/python-ldap.spec b/tests/python-ldap.spec index fef1bd4..a08b605 100644 --- a/tests/python-ldap.spec +++ b/tests/python-ldap.spec @@ -54,7 +54,7 @@ rm Tests/t_ldapobject.py Tests/t_cext.py Tests/t_edit.py Tests/t_ldap_sasl.py Te %build %pyproject_wheel # Internal check that we can import the built extension modules from %%{pyproject_build_lib} -! %{python3} -c 'import _ldap' +%{python3} -c 'import _ldap' && exit 1 || true PYTHONPATH=%{pyproject_build_lib} %{python3} -c 'import _ldap' @@ -78,14 +78,14 @@ test -f %{buildroot}%{python3_sitearch}/_ldap.cpython-*.so # Internal check: Unmatched modules are not supposed to be listed in %%{pyproject_files} # We'll list them explicitly -! grep -F %{python3_sitearch}/ldif.py %{pyproject_files} -! grep -F %{python3_sitearch}/__pycache__/ldif.cpython-%{python3_version_nodots}.pyc %{pyproject_files} -! grep -F %{python3_sitearch}/__pycache__/ldif.cpython-%{python3_version_nodots}.opt-1.pyc %{pyproject_files} -! grep -F %{python3_sitearch}/slapdtest %{pyproject_files} +grep -F %{python3_sitearch}/ldif.py %{pyproject_files} && exit 1 || true +grep -F %{python3_sitearch}/__pycache__/ldif.cpython-%{python3_version_nodots}.pyc %{pyproject_files} && exit 1 || true +grep -F %{python3_sitearch}/__pycache__/ldif.cpython-%{python3_version_nodots}.opt-1.pyc %{pyproject_files} && exit 1 || true +grep -F %{python3_sitearch}/slapdtest %{pyproject_files} && exit 1 || true # Internal check: Top level __pycache__ is never owned -! grep -E '/site-packages/__pycache__$' %{pyproject_files} -! grep -E '/site-packages/__pycache__/$' %{pyproject_files} +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