From 0cda6581f76f74b4ebf5dfde94dd649a7dba54a9 Mon Sep 17 00:00:00 2001 From: Carl George Date: Sat, 14 Nov 2020 17:10:13 -0600 Subject: [PATCH] Add doc subpackage --- python-trustme.spec | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/python-trustme.spec b/python-trustme.spec index 059814d..da4d7db 100644 --- a/python-trustme.spec +++ b/python-trustme.spec @@ -17,11 +17,12 @@ tests. Well, technically they are real certs, they are just signed by your CA, which nobody trusts. But you can trust it. Trust me.} %bcond_without tests +%bcond_without docs Name: python-%{pkgname} Version: 0.6.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: #1 quality TLS certs while you wait, for the discerning tester License: MIT or ASL 2.0 URL: https://github.com/python-trio/trustme @@ -37,7 +38,8 @@ Summary: %{summary} BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} %if %{with tests} -BuildRequires: %{py3_dist pytest pyopenssl service-identity cryptography idna} +BuildRequires: %{py3_dist pytest pyopenssl service-identity} +BuildRequires: %{py3_dist cryptography idna} %endif %{?python_provide:%python_provide python3-%{pkgname}} @@ -45,6 +47,18 @@ BuildRequires: %{py3_dist pytest pyopenssl service-identity cryptography idna} %description -n python3-%{pkgname} %{common_description} +%if %{with docs} +%package -n python-%{pkgname}-doc +Summary: Documentation for %{name} +BuildRequires: %{py3_dist sphinx sphinxcontrib-trio} +BuildRequires: %{py3_dist cryptography idna} + + +%description -n python-%{pkgname}-doc +Documentation for %{name}. +%endif + + %prep %autosetup -n %{srcname}-%{version} rm -rf %{eggname}.egg-info @@ -53,6 +67,10 @@ rm -rf %{eggname}.egg-info %build %py3_build +%if %{with docs} +sphinx-build-3 docs/source html +%endif + %install %py3_install @@ -79,7 +97,17 @@ rm -rf %{eggname}.egg-info %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info +%if %{with docs} +%files -n python-%{pkgname}-doc +%license LICENSE LICENSE.MIT LICENSE.APACHE2 +%doc html +%endif + + %changelog +* Sat Nov 14 2020 Carl George - 0.6.0-5 +- Add doc subpackage + * Wed Oct 07 2020 Carl George - 0.6.0-4 - Remove explicit run time requires in favor of automatically generated ones