From 79484872db76a8ee1dc2533cceb0447b683049bc Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 24 Jun 2021 08:15:00 -0400 Subject: [PATCH] Build the HTML documentation and add a -doc subpackage --- python-sure.spec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/python-sure.spec b/python-sure.spec index 906c68f..73d85dd 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -27,11 +27,17 @@ BuildRequires: pyproject-rpm-macros # https://fedoraproject.org/wiki/Changes/DeprecatePythonMock # https://github.com/gabrielfalcao/sure/pull/161 +# Test dependencies # TODO: remove the test dependency on nose # https://fedoraproject.org/wiki/Changes/DeprecateNose BuildRequires: python3dist(nose) BuildRequires: python3dist(pytest) +# Documentation dependentcies +BuildRequires: make +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinx-rtd-theme) + %global common_description %{expand: An idiomatic testing library for python with powerful and flexible assertions created by Gabriel Falcão. Sure’s developer experience is inspired and modeled @@ -50,12 +56,19 @@ Summary: %{summary} %description -n python3-%{srcname} %{common_description} +%package doc +Summary: Documentation for Sure + +%description doc %{common_description} + + %prep %autosetup -p1 -n %{srcname}-%{version} %build %pyproject_wheel +%make_build -C docs/ html SPHINXOPTS='%{?_smp_mflags}' %install @@ -69,9 +82,13 @@ Summary: %{summary} %files -n python3-%{srcname} -f %{pyproject_files} %license COPYING + + +%files doc %doc CHANGELOG.md %doc README.rst %doc TODO.rst +%doc docs/build/html %changelog @@ -86,6 +103,7 @@ Summary: %{summary} - Package CHANGELOG.md, README.rst, and TODO.rst - Update summaries and descriptions - Switch to pyproject-rpm-macros +- Build the HTML documentation and add a -doc subpackage * Wed Jun 02 2021 Python Maint - 1.4.11-13 - Rebuilt for Python 3.10