diff --git a/python-pillow.spec b/python-pillow.spec index 993150b..3ac0beb 100644 --- a/python-pillow.spec +++ b/python-pillow.spec @@ -2,12 +2,11 @@ %global py3_libbuilddir %(python3 -c 'import sys; import sysconfig; print("lib.{p}-{v[0]}.{v[1]}".format(p=sysconfig.get_platform(), v=sys.version_info))') %global srcname pillow -# bootstrap building docs (pillow is required by docutils, docutils are -# required by sphinx; pillow build-requires sphinx) +# EPEL9 is missing some dependencies to build the documentation %if 0%{?el9} -%bcond_without bootstrap +%bcond_with doc %else -%bcond_with bootstrap +%bcond_without doc %endif Name: python-%{srcname} @@ -45,7 +44,7 @@ BuildRequires: python%{python3_pkgversion}-olefile BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-qt5 BuildRequires: python%{python3_pkgversion}-setuptools -%if %{without bootstrap} +%if %{with doc} BuildRequires: make BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx-copybutton @@ -138,7 +137,7 @@ Qt %{srcname} image wrapper. # Build Python 3 modules %py3_build -%if %{without bootstrap} +%if %{with doc} 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 @@ -183,7 +182,7 @@ popd %files -n python%{python3_pkgversion}-%{srcname}-devel %{py3_incdir}/Imaging/ -%if %{without bootstrap} +%if %{with doc} %files -n python%{python3_pkgversion}-%{srcname}-doc %doc docs/_build_py3/html %endif