From 53b34627ade1d8222eefb2a8efcc232237d8576d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 10 Feb 2023 12:55:55 -0500 Subject: [PATCH] Disable docs and tests by default in RHEL builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- python-packaging.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python-packaging.spec b/python-packaging.spec index 437d636..64c4171 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -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