From 993ddb642862f106356098c53bd4c1240e7a9443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 14 Jun 2018 13:56:37 +0200 Subject: [PATCH] Make it able to boostrap --- python-packaging.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python-packaging.spec b/python-packaging.spec index ea93e7a..8a7d319 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -5,6 +5,9 @@ %global with_python3 1 %endif +# Use this when bootstraping python3-sphinx +%bcond_with bootstrap + %global python2_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl %global python3_wheelname %python2_wheelname @@ -43,7 +46,12 @@ BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pretend BuildRequires: python%{python3_pkgversion}-pyparsing BuildRequires: python%{python3_pkgversion}-six +%if %{without bootstrap} BuildRequires: python%{python3_pkgversion}-sphinx +%else +# When bootstrapping, we'll use Python 2 sphinx +BuildRequires: python2-sphinx +%endif %endif %if 0%{?build_wheel} @@ -113,7 +121,7 @@ rm -rf %{pypi_name}.egg-info %endif # generate html docs -%if 0%{?with_python3} +%if 0%{?with_python3} && %{without bootstrap} sphinx-build-3 docs html %else sphinx-build docs html