Add bootstrap bcond

This commit is contained in:
Miro Hrončok 2019-03-19 18:40:56 +01:00
parent a61c36af85
commit 8185a3a893

View File

@ -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