From 0b1760abe6fecaaccc952ba3fee359b3a3c72ad0 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 5 Jul 2024 14:53:29 -0400 Subject: [PATCH] Disable tomlkit and manpages on RHEL tomcli has recently appeared as a potential build dependency for ELN packages. It is unclear at this point whether tomcli will end up as a required dependency for RHEL 11, but if it does, it will likely be with minimal dependencies. tomli-w is already in RHEL, but tomlkit is not, nor is scdoc for the manpages. If it ends up in EPEL instead (as it may already for 10), then the extra dependencies are not a concern. Also, some fixes are needed when manpages are disabled. --- tomcli.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tomcli.spec b/tomcli.spec index d6eea8c..706728d 100644 --- a/tomcli.spec +++ b/tomcli.spec @@ -17,9 +17,9 @@ # Allows tomcli to be built early in the new Python bootstrap process. %bcond bootstrap 0 -%bcond tomlkit %{without bootstrap} +%bcond tomlkit %[%{without bootstrap} && (%{undefined rhel} || %{defined epel})] %bcond tests %{without bootstrap} -%bcond manpages 1 +%bcond manpages %[%{undefined rhel} || %{defined epel}] # Add minimal py3_test_envvars for EPEL 9 %if %{undefined py3_test_envvars} @@ -90,8 +90,10 @@ done %pyproject_install %pyproject_save_files tomcli +%if %{with manpages} # Install manpages install -Dpm 0644 doc/*.1 -t %{buildroot}%{_mandir}/man1 +%endif # Install shell completions ( @@ -135,7 +137,9 @@ test "${newname}" = "not-tomcli" %{bash_completions_dir}/tomcli* %{fish_completions_dir}/tomcli*.fish %{zsh_completions_dir}/_tomcli* +%if %{with manpages} %{_mandir}/man1/tomcli*.1* +%endif %changelog