Miro Hrončok 2022-04-06 13:36:26 +02:00
parent 8e9b0a2a0d
commit 6015300d34
4 changed files with 15 additions and 12 deletions

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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