diff --git a/babel.spec b/babel.spec index ccc8e2b..4db13d4 100644 --- a/babel.spec +++ b/babel.spec @@ -4,7 +4,7 @@ # There is some bootstrapping involved when upgrading Python 3 # First of all we need babel (this package) to use sphinx # And pytest is at this point not yet ready -%global bootstrap 0 +%bcond_with bootstrap # Build without Python 2 support from F33 on. %if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 33 || 0%{?rhel} >= 9 @@ -42,7 +42,7 @@ BuildRequires: python2-freezegun %endif BuildRequires: python3-devel BuildRequires: python3-setuptools -%if !%{bootstrap} +%if !%{with bootstrap} BuildRequires: python3-pytz BuildRequires: python3-pytest BuildRequires: python3-freezegun @@ -51,7 +51,7 @@ BuildRequires: python3-freezegun # build the documentation BuildRequires: make -%if !%{bootstrap} +%if !%{with bootstrap} BuildRequires: python3-sphinx %endif Requires: python3-babel @@ -109,7 +109,7 @@ Babel is composed of two major parts: providing access to various locale display names, localized number and date formatting, etc. -%if !%{bootstrap} +%if !%{with bootstrap} %package doc Summary: Documentation for Babel Provides: python-babel-doc = %{version}-%{release} @@ -132,7 +132,7 @@ Documentation for Babel BUILDDIR="$PWD/built-docs" rm -rf "$BUILDDIR" -%if !%{bootstrap} +%if !%{with bootstrap} pushd docs make \ SPHINXBUILD=sphinx-build-3 \ @@ -153,7 +153,7 @@ export TZ=America/New_York %if %{with python2} && %{with python2_pytest} %{__python2} -m pytest %endif -%if !%{bootstrap} +%if !%{with bootstrap} %{__python3} -m pytest %endif @@ -172,7 +172,7 @@ export TZ=America/New_York %{python3_sitelib}/Babel-%{version}-py*.egg-info %{python3_sitelib}/babel -%if !%{bootstrap} +%if !%{with bootstrap} %files doc %doc built-docs/html/* %endif