From 1edf00e291faa652ebfb6cb809372e7863b06163 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 27 Jan 2022 11:11:19 -0800 Subject: [PATCH] Convert conditionals to bcond, set EPEL 9 to bootstrap mode Signed-off-by: Michel Alexandre Salim --- python-pillow.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python-pillow.spec b/python-pillow.spec index 3cd8483..993150b 100644 --- a/python-pillow.spec +++ b/python-pillow.spec @@ -4,7 +4,11 @@ %global srcname pillow # bootstrap building docs (pillow is required by docutils, docutils are # required by sphinx; pillow build-requires sphinx) -%global with_docs 1 +%if 0%{?el9} +%bcond_without bootstrap +%else +%bcond_with bootstrap +%endif Name: python-%{srcname} Version: 9.0.0 @@ -41,7 +45,7 @@ BuildRequires: python%{python3_pkgversion}-olefile BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-qt5 BuildRequires: python%{python3_pkgversion}-setuptools -%if 0%{?with_docs} +%if %{without bootstrap} BuildRequires: make BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-copybutton @@ -134,7 +138,7 @@ Qt %{srcname} image wrapper. # Build Python 3 modules %py3_build -%if 0%{?with_docs} +%if %{without bootstrap} PYTHONPATH=$PWD/build/%py3_libbuilddir make -C docs html BUILDDIR=_build_py3 SPHINXBUILD=sphinx-build-%python3_version rm -f docs/_build_py3/html/.buildinfo %endif @@ -179,8 +183,8 @@ popd %files -n python%{python3_pkgversion}-%{srcname}-devel %{py3_incdir}/Imaging/ +%if %{without bootstrap} %files -n python%{python3_pkgversion}-%{srcname}-doc -%if 0%{?with_docs} %doc docs/_build_py3/html %endif