CI specs: Never use ! ...
as a check
See https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/TFQGD7CSTD5WVKVT3WDIGF5D6DID5NK6/ Related: rhbz#2060109
This commit is contained in:
parent
44772c3c74
commit
0b9b782c5c
@ -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
|
||||
|
@ -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}
|
||||
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user