| |
@@ -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 @@
|
| |
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 @@
|
| |
|
| |
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 @@
|
| |
%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 @@
|
| |
%{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 <loganjerry@gmail.com> - 5.4.0-4
|
| |
Make it possible to disable building the documentation subpackage. This makes it easier to build this package on platforms where not all the doc dependencies are available. For example, CentOS 9 does not have a "python3-docs" subpackage.