#7 Switch bootstrap to bcond
Merged 2 months ago by nphilipp. Opened 2 months ago by lbalhar.
rpms/ lbalhar/babel master  into  master

file modified
+7 -7

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

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

  # build the documentation

  BuildRequires:  make

  

- %if !%{bootstrap}

+ %if !%{with bootstrap}

  BuildRequires:  python3-sphinx

  %endif

  Requires:       python3-babel

@@ -109,7 +109,7 @@ 

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

  BUILDDIR="$PWD/built-docs"

  rm -rf "$BUILDDIR"

  

- %if !%{bootstrap}

+ %if !%{with bootstrap}

  pushd docs

  make \

      SPHINXBUILD=sphinx-build-3 \

@@ -153,7 +153,7 @@ 

  %if %{with python2} && %{with python2_pytest}

  %{__python2} -m pytest

  %endif

- %if !%{bootstrap}

+ %if !%{with bootstrap}

  %{__python3} -m pytest

  %endif

  

@@ -172,7 +172,7 @@ 

  %{python3_sitelib}/Babel-%{version}-py*.egg-info

  %{python3_sitelib}/babel

  

- %if !%{bootstrap}

+ %if !%{with bootstrap}

  %files doc

  %doc built-docs/html/*

  %endif

To unify it with the other conditions.

Looks good to me, thanks!

Pull-Request has been merged by nphilipp

2 months ago