diff --git a/python-zope-interface.spec b/python-zope-interface.spec index d4dae17..d1caf89 100644 --- a/python-zope-interface.spec +++ b/python-zope-interface.spec @@ -1,3 +1,5 @@ +%bcond_without docs + # Install doc subpackage files into the main package doc directory %global _docdir_fmt %{name} @@ -22,9 +24,6 @@ Summary: Zope 3 Interface Infrastructure BuildRequires: gcc BuildRequires: make BuildRequires: python3-devel -BuildRequires: python3-docs -BuildRequires: %{py3_dist sphinx} -BuildRequires: %{py3_dist repoze-sphinx-autointerface} %description -n python3-zope-interface Interfaces are a mechanism for labeling objects as conforming to a given API @@ -32,12 +31,17 @@ or contract. This is a separate distribution of the zope.interface package used in Zope 3. +%if %{with docs} %package doc Summary: Documentation for zope.interface BuildArch: noarch +BuildRequires: python3-docs +BuildRequires: %{py3_dist sphinx} +BuildRequires: %{py3_dist repoze-sphinx-autointerface} %description doc Documentation for %{name}. +%endif %prep %autosetup -n zope.interface-%{version} @@ -54,9 +58,11 @@ sed -i "s|\('https://docs\.python\.org/': \)None|\1'%{_docdir}/python3-docs/html %build %pyproject_wheel +%if %{with docs} # build the sphinx documents PYTHONPATH=$PWD/src make -C docs html rm -f docs/_build/html/.buildinfo +%endif %install %pyproject_install @@ -81,8 +87,10 @@ popd %{python3_sitearch}/zope.interface-*.dist-info %{python3_sitearch}/zope.interface-*-nspkg.pth +%if %{with docs} %files doc %doc docs/_build/html/ +%endif %changelog * Wed Sep 8 2021 Jerry James - 5.4.0-4