From bed79dff85fbe15462d02223e09dfdb399131b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 15 Jun 2018 11:18:39 +0200 Subject: [PATCH] Add the forgotten bootstrapping conditionals --- python-whoosh.spec | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/python-whoosh.spec b/python-whoosh.spec index f1e4eef..a3023ee 100644 --- a/python-whoosh.spec +++ b/python-whoosh.spec @@ -3,6 +3,9 @@ %global with_python3 1 %endif +# For bootstrapping sphinxcontrib-websupport +%bcond_without docs + %global mod_name Whoosh Name: python-whoosh @@ -17,8 +20,11 @@ Source0: https://pypi.python.org/packages/source/W/%{mod_name}/%{mod_name BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools -BuildRequires: python2-pytest +BuildRequires: python2-pytest + +%if %{with docs} BuildRequires: python2-sphinx +%endif %if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-devel @@ -59,9 +65,12 @@ works can be extended or replaced to meet your needs exactly. %build %py2_build + +%if %{with docs} sphinx-build docs/source docs/html rm -f docs/html/.buildinfo rm -rf docs/html/.doctrees +%endif %if 0%{?with_python3} %py3_build @@ -85,14 +94,20 @@ rm -rf docs/html/.doctrees %files -n python2-whoosh %license LICENSE.txt -%doc docs/html/ README.txt +%doc README.txt +%if %{with docs} +%doc docs/html/ +%endif %{python2_sitelib}/*.egg-info/ %{python2_sitelib}/whoosh %if 0%{?with_python3} %files -n python%{python3_pkgversion}-whoosh %license LICENSE.txt -%doc README.txt docs/html/ +%doc README.txt +%if %{with docs} +%doc docs/html/ +%endif %{python3_sitelib}/whoosh %{python3_sitelib}/*.egg-info/ %endif