Skip to content

Commit

Permalink
Add doc guard for doc sub packaging
Browse files Browse the repository at this point in the history
redhat-openstack/easyfix#6
Also use 'html' doc builder explicitly for doc generation.

Change-Id: Ia73dbbfe4d4cb5d18c898c94f4c2f837b8022b4a
  • Loading branch information
karelyatin committed Sep 28, 2017
1 parent 0681dd5 commit b64358e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions openstack-ironic-inspector.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
%global modulename ironic_inspector
%{!?upstream_version: %global upstream_version %{version}}

%global with_doc 1

Name: openstack-ironic-inspector
Summary: Hardware introspection service for OpenStack Ironic
Version: XXX
Expand Down Expand Up @@ -46,11 +48,9 @@ BuildRequires: python-oslo-i18n
BuildRequires: python-oslo-log
BuildRequires: python-oslo-middleware
BuildRequires: python-oslo-serialization
BuildRequires: python-oslo-sphinx
BuildRequires: python-oslo-utils
BuildRequires: python-oslotest
BuildRequires: python-six
BuildRequires: python-sphinx
BuildRequires: python-sqlalchemy
BuildRequires: python-stevedore
BuildRequires: python-swiftclient
Expand Down Expand Up @@ -102,11 +102,16 @@ properties discovery is a process of getting hardware parameters required for
scheduling from a bare metal node, given it’s power management credentials
(e.g. IPMI address, user name and password).

%if 0%{?with_doc}
%package -n openstack-ironic-inspector-doc
Summary: Documentation for Ironic Inspector.

BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx

%description -n openstack-ironic-inspector-doc
Documentation for Ironic Inspector.
%endif

%package -n python-%{service}-tests
Summary: %{service} Tempest plugin
Expand All @@ -125,7 +130,9 @@ It contains the unit tests and tempest plugins

%build
%{__python2} setup.py build
%{__python2} setup.py build_sphinx
%if 0%{?with_doc}
%{__python2} setup.py build_sphinx -b html
%endif

%install
%{__python2} setup.py install --skip-build --root=%{buildroot}
Expand Down Expand Up @@ -185,9 +192,11 @@ mkdir -p %{buildroot}%{_sharedstatedir}/ironic-inspector
%doc %{_mandir}/man8/ironic-inspector.8.gz
%exclude %{python2_sitelib}/%{modulename}_tests.egg-info

%if 0%{?with_doc}
%files -n openstack-ironic-inspector-doc
%license LICENSE
%doc CONTRIBUTING.rst doc/build/html
%endif

%files -n python-%{service}-tests
%license LICENSE
Expand Down

0 comments on commit b64358e

Please sign in to comment.