From 8185a3a893df2114b7a516717610663ac75c10f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 19 Mar 2019 18:40:56 +0100 Subject: [PATCH] Add bootstrap bcond --- python-sphinx_rtd_theme.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python-sphinx_rtd_theme.spec b/python-sphinx_rtd_theme.spec index 5b85e03..cd22680 100644 --- a/python-sphinx_rtd_theme.spec +++ b/python-sphinx_rtd_theme.spec @@ -1,5 +1,8 @@ %global srcname sphinx_rtd_theme +# Disables tests and docs +%bcond_with bootstrap + Name: python-%{srcname} Version: 0.4.3 Release: 2%{?dist} @@ -11,10 +14,12 @@ Source0: https://github.com/rtfd/%{srcname}/archive/%{version}/%{srcname} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3dist(pytest) BuildRequires: python3dist(setuptools) +%if %{without bootstrap} +BuildRequires: python3dist(pytest) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinxcontrib-httpdomain) +%endif %description This is a prototype mobile-friendly sphinx theme for readthedocs.org. @@ -43,8 +48,10 @@ of that site. %build %py3_build +%if %{without bootstrap} # Build the documentation make -C docs html SPHINXBUILD=sphinx-build-3 +%endif %install @@ -70,12 +77,18 @@ cp -p fonts/RobotoSlab/*.{eot,woff,woff2} \ %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/RobotoSlab cp -p fonts/Lato/*.{eot,woff,woff2} \ %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/Lato + +%if %{without bootstrap} rm -fr docs/build/html/_static/fonts cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \ docs/build/html/_static +%endif +%if %{without bootstrap} %check %{__python3} setup.py test +%endif + %files -n python3-%{srcname} %doc README.rst