diff --git a/babel.spec b/babel.spec index 1ef9c22..ccc8e2b 100644 --- a/babel.spec +++ b/babel.spec @@ -11,7 +11,14 @@ %bcond_with python2 %else %bcond_without python2 +# We ship python2-pytest only up to F31. +%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 32 || 0%{?rhel} >= 9 +%bcond_with python2_pytest +%else +%bcond_without python2_pytest %endif +%endif + Name: babel Version: 2.7.0 @@ -27,7 +34,7 @@ BuildArch: noarch %if %{with python2} BuildRequires: python2-devel BuildRequires: python2-setuptools -%if 0%{?fedora} < 32 +%if %{with python2_pytest} BuildRequires: python2-pytz BuildRequires: python2-pytest BuildRequires: python2-freezegun @@ -143,7 +150,7 @@ rm -f "$BUILDDIR/html/.buildinfo" %check export TZ=America/New_York -%if %{with python2} +%if %{with python2} && %{with python2_pytest} %{__python2} -m pytest %endif %if !%{bootstrap}