Skip to content

Commit

Permalink
Added the doc_guard to it.
Browse files Browse the repository at this point in the history
redhat-openstack/easyfix#6

Change-Id: I96b65da7a8616183f5988bdb268a7ba7f6c137f6
  • Loading branch information
jatanmalde committed Oct 16, 2017
1 parent d4f7c9d commit 0d2e635
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python-oslo-rootwrap.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%if 0%{?fedora} >= 24
%global with_python3 1
%endif

%global with_doc 1
%global pypi_name oslo.rootwrap
%global pkg_name oslo-rootwrap

Expand Down Expand Up @@ -48,6 +48,7 @@ but called as a separate process through the `oslo-rootwrap` command:

`sudo oslo-rootwrap ROOTWRAP_CONFIG COMMAND_LINE`

%if 0%{?with_doc}
%package -n python-%{pkg_name}-doc
Summary: Documentation for Oslo Rootwrap

Expand All @@ -56,6 +57,7 @@ BuildRequires: python-openstackdocstheme

%description -n python-%{pkg_name}-doc
Documentation for Oslo Rootwrap
%endif

%package -n python2-%{pkg_name}-tests
Summary: Tests for Oslo Rootwrap
Expand Down Expand Up @@ -143,10 +145,12 @@ but called as a separate process through the `oslo-rootwrap` command:
%py3_build
%endif

%if 0%{?with_doc}
# generate html docs
%{__python2} setup.py build_sphinx -b html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif

%install
%if 0%{?with_python3}
Expand All @@ -170,9 +174,11 @@ PYTHONPATH=. %{__python3} setup.py test
%{_bindir}/oslo-rootwrap-daemon
%exclude %{python2_sitelib}/oslo_rootwrap/tests

%if 0%{?with_doc}
%files -n python-%{pkg_name}-doc
%doc doc/build/html
%license LICENSE
%endif

%files -n python2-%{pkg_name}-tests
%{python2_sitelib}/oslo_rootwrap/tests
Expand Down

0 comments on commit 0d2e635

Please sign in to comment.