From 265710e6415efdd3f47cde9c6d0ba8740c789bb1 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Oct 01 2021 16:17:02 +0000 Subject: Generate PDF instead of HTML Sphinx documentation. See https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. --- diff --git a/python-flask-migrate.spec b/python-flask-migrate.spec index b1fb07d..674e0f6 100644 --- a/python-flask-migrate.spec +++ b/python-flask-migrate.spec @@ -3,6 +3,12 @@ %bcond_without tests +# 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 lesser substitute. +%bcond_without doc_pdf + # Name used in egg-info %global eggname %(\ awk -vn='%{srcname}' 'BEGIN { gsub(/-/, "_", n); print n }') @@ -14,7 +20,7 @@ Name: python-%{rpmname} Version: 2.5.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: SQLAlchemy database migrations for Flask applications using Alembic License: MIT @@ -34,8 +40,13 @@ BuildRequires: %{py3_dist alembic} >= 0.7 BuildRequires: %{py3_dist Flask-Script} >= 0.6 %endif +# Documentation +%if %{with doc_pdf} BuildRequires: python3dist(sphinx) BuildRequires: make +BuildRequires: python3-sphinx-latex +BuildRequires: latexmk +%endif %description SQLAlchemy database migrations for Flask applications using Alembic. @@ -66,7 +77,10 @@ sed -r -i 's/(python)( |$)/\13\2/g' tests/*.py %build %py3_build -%make_build -C docs SPHINXOPTS='%{?_smp_mflags}' html +%if %{with doc_pdf} +%make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' +%make_build -C docs/_build/latex +%endif %install @@ -92,10 +106,15 @@ echo 'Tests are disabled' %files doc %license LICENSE %doc README.md -%doc docs/_build/html +%if %{with doc_pdf} +%doc docs/_build/latex/Flask-Migrate.pdf +%endif %changelog +* Fri Oct 01 2021 Benjamin A. Beasley - 2.5.3-5 +- Build PDF docs instead of HTML + * Mon May 24 2021 Benjamin A. Beasley - 2.5.3-4 - Re-enable tests on F35/Rawhide since python-flask-sqlalchemy is now updated to 2.5.x.