From cdd903e8f5371c63f5e7d527e74eaad53c0147d1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 29 Dec 2023 11:57:33 -0500 Subject: [PATCH] Build Sphinx-generated docs as PDF, not HTML, to sidestep guidelines issues --- python-wrapt.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/python-wrapt.spec b/python-wrapt.spec index 0ee7698..d9e9a19 100644 --- a/python-wrapt.spec +++ b/python-wrapt.spec @@ -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 Name: python-wrapt @@ -30,6 +34,9 @@ Summary: %{summary} %package doc Summary: Documentation for the wrapt module +BuildRequires: make +BuildRequires: python3-sphinx-latex +BuildRequires: latexmk # docs/requirements.txt BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx_rtd_theme} @@ -48,10 +55,9 @@ rm -rf wrapt.egg-info %py3_build %if %{with docs} -# for docs -pushd docs -sphinx-build -b html -d build/doctrees . build/html -popd +PYTHONPATH="${PWD}" %make_build -C docs latex \ + SPHINXOPTS='-j%{?_smp_build_ncpus}' +%make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif %install @@ -60,7 +66,7 @@ popd %if %{with docs} %files doc %license LICENSE -%doc docs/build/html +%doc docs/_build/latex/wrapt.pdf %endif %files -n python3-wrapt