Build Sphinx-generated docs as PDF, not HTML, to sidestep guidelines issues

epel9
Benjamin A. Beasley 1 year ago
parent 59dbd503ac
commit cdd903e8f5

@ -1,3 +1,7 @@
# Sphinx-generated HTML documentation is not suitable for packaging; see
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
#
# We can generate PDF documentation as a substitute.
%bcond docs 1 %bcond docs 1
Name: python-wrapt Name: python-wrapt
@ -30,6 +34,9 @@ Summary: %{summary}
%package doc %package doc
Summary: Documentation for the wrapt module Summary: Documentation for the wrapt module
BuildRequires: make
BuildRequires: python3-sphinx-latex
BuildRequires: latexmk
# docs/requirements.txt # docs/requirements.txt
BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx}
BuildRequires: %{py3_dist sphinx_rtd_theme} BuildRequires: %{py3_dist sphinx_rtd_theme}
@ -48,10 +55,9 @@ rm -rf wrapt.egg-info
%py3_build %py3_build
%if %{with docs} %if %{with docs}
# for docs PYTHONPATH="${PWD}" %make_build -C docs latex \
pushd docs SPHINXOPTS='-j%{?_smp_build_ncpus}'
sphinx-build -b html -d build/doctrees . build/html %make_build -C docs/_build/latex LATEXMKOPTS='-quiet'
popd
%endif %endif
%install %install
@ -60,7 +66,7 @@ popd
%if %{with docs} %if %{with docs}
%files doc %files doc
%license LICENSE %license LICENSE
%doc docs/build/html %doc docs/_build/latex/wrapt.pdf
%endif %endif
%files -n python3-wrapt %files -n python3-wrapt

Loading…
Cancel
Save