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.
This commit is contained in:
Yaakov Selkowitz
2024-07-22 22:41:35 +00:00
committed by yselkowitz
parent d35de8653f
commit 0b1760abe6
+6 -2
View File
@@ -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