diff --git a/babel.spec b/babel.spec index 1e86576..e9e69d3 100644 --- a/babel.spec +++ b/babel.spec @@ -1,7 +1,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 -%bcond_with bootstrap +%bcond bootstrap 0 # Since babel 2.12, the pytz dependency is optional. # However, pytz is preferred when installed. @@ -26,7 +26,8 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools -%if !%{with bootstrap} + +%if %{without bootstrap} BuildRequires: coreutils BuildRequires: python3-pytest BuildRequires: python3-freezegun @@ -34,12 +35,8 @@ BuildRequires: python3-freezegun # The pytz tests are skipped when pytz is missing BuildRequires: python3-pytz %endif -%endif - # build the documentation BuildRequires: make - -%if !%{with bootstrap} BuildRequires: python3-sphinx %endif Requires: python3-babel @@ -67,7 +64,7 @@ Babel is composed of two major parts: providing access to various locale display names, localized number and date formatting, etc. -%if !%{with bootstrap} +%if %{without bootstrap} %package doc Summary: Documentation for Babel Provides: python-babel-doc = %{version}-%{release} @@ -86,7 +83,7 @@ Documentation for Babel BUILDDIR="$PWD/built-docs" rm -rf "$BUILDDIR" -%if !%{with bootstrap} +%if %{without bootstrap} pushd docs make \ SPHINXBUILD=sphinx-build-3 \ @@ -99,13 +96,13 @@ rm -f "$BUILDDIR/html/.buildinfo" %install %py3_install -%if !%{with bootstrap} +%if %{without bootstrap} install -D -m 0644 built-docs/man/babel.1 %{buildroot}%{_mandir}/man1/pybabel.1 %endif %check export TZ=UTC -%if !%{with bootstrap} +%if %{without bootstrap} %pytest %endif @@ -114,7 +111,7 @@ export TZ=UTC %license LICENSE %{_bindir}/pybabel -%if !%{with bootstrap} +%if %{without bootstrap} %{_mandir}/man1/pybabel.1* %endif @@ -122,7 +119,7 @@ export TZ=UTC %{python3_sitelib}/Babel-%{version}-py*.egg-info/ %{python3_sitelib}/babel/ -%if !%{with bootstrap} +%if %{without bootstrap} %files doc %doc built-docs/html/* %endif