Disable docs and tests by default in RHEL builds

This avoided unwanted dependencies,
particularly python-pretend needed for tests,
in the RHEL buildroot.

The docs don't pull in any unwanted dependencies,
but it's easier to disable them together with tests
and we don't particularly desire python-packaging-docs in RHEL anyway.

Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
This commit is contained in:
Yaakov Selkowitz 2023-02-10 12:55:55 -05:00 committed by Miro Hrončok
parent 89328a2950
commit 53b34627ad

View File

@ -2,10 +2,12 @@
# Specify --with bootstrap to build in bootstrap mode
# This mode is needed, because python3-rpm-generators need packaging
# When bootstrapping, disable tests and docs as well.
%bcond_with bootstrap
%if %{without bootstrap}
# When bootstrapping, the tests and docs are disabled because the dependencies are not yet available.
# We don't want python-pretend in future RHEL, so we disable tests on RHEL as well.
# No reason to ship the documentation in RHEL either, so it is also disabled by default.
%if %{without bootstrap} && %{undefined rhel}
# Specify --without docs to prevent the dependency loop on python-sphinx
%bcond_without docs