public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyperclip] epel10.3: Switch Sphinx documentation to PDF to sidestep guidelines issues
@ 2026-09-21  9:02 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-21  9:02 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pyperclip
Branch : epel10.3
Commit : d3895a1f1e6b6d052162867fb5d3f50a1dabb752
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2022-08-12T13:35:43-04:00
Stats  : +22/-6 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyperclip/c/d3895a1f1e6b6d052162867fb5d3f50a1dabb752?branch=epel10.3

Log:
Switch Sphinx documentation to PDF to sidestep guidelines issues

---
diff --git a/python-pyperclip.spec b/python-pyperclip.spec
index f5e17b9..896b9e5 100644
--- a/python-pyperclip.spec
+++ b/python-pyperclip.spec
@@ -1,3 +1,9 @@
+# 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_without doc_pdf
+
 %global pypi_name pyperclip
 
 
@@ -65,7 +71,13 @@ functions.
 
 %package -n python-%{pypi_name}-doc
 Summary:        Pyperclip documentation
-BuildRequires:  python3-sphinx
+
+%if %{with doc_pdf}
+BuildRequires:  make
+BuildRequires:  python3dist(sphinx)
+BuildRequires:  python3-sphinx-latex
+BuildRequires:  latexmk
+%endif
 
 %description -n python-%{pypi_name}-doc
 Documentation for pyperclip
@@ -81,10 +93,11 @@ sed -i 's/\r$//' README.md docs/*
 
 %build
 %py3_build
-# generate html docs
-PYTHONPATH=${PWD} sphinx-build docs html
-# remove the sphinx-build leftovers
-rm -rf html/.{doctrees,buildinfo}
+
+%if %{with doc_pdf}
+PYTHONPATH="${PWD}/src" %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}'
+%make_build -C docs/_build/latex LATEXMKOPTS='-quiet'
+%endif
 
 %install
 %py3_install
@@ -105,11 +118,14 @@ rm -rf html/.{doctrees,buildinfo}
 
 %files -n python-%{pypi_name}-doc
 %license LICENSE.txt
-%doc html
+%if %{with doc_pdf}
+%doc docs/_build/latex/Pyperclip.pdf
+%endif
 
 %changelog
 * Fri Aug 12 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.8.2-2
 - Enable running most of the graphical tests
+- Switch Sphinx documentation to PDF to sidestep guidelines issues
 
 * Mon Aug 08 2022 Jonathan Wright <jonathan@almalinux.org> - 1.8.2-1
 - Update to 1.8.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-21  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21  9:02 [rpms/python-pyperclip] epel10.3: Switch Sphinx documentation to PDF to sidestep guidelines issues Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox