Juan Hernandez has uploaded a new change for review.

Change subject: sdk: Add documentation subpackage
......................................................................

sdk: Add documentation subpackage

This patch modifies the .spec of the SDK so that it generates a new
"doc" subpackage that contains the documentation automatically generated
with the "sphinx-apidoc" tool.

Change-Id: Id0243488fb8349c127eadcd0e940bf462a45b449
Signed-off-by: Juan Hernandez <[email protected]>
---
M ovirt-engine-sdk-python.spec.in
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/86/39186/1

diff --git a/ovirt-engine-sdk-python.spec.in b/ovirt-engine-sdk-python.spec.in
index 223a9b9..a810872 100644
--- a/ovirt-engine-sdk-python.spec.in
+++ b/ovirt-engine-sdk-python.spec.in
@@ -22,6 +22,15 @@
 This package contains The oVirt-Engine Software Development Kit.
 With this package, custom software can be built for oVirt-Engine.
 
+%package doc
+Summary: Documentation for oVirt Engine Python SDK
+Group: Documentation
+BuildRequires: python-sphinx
+
+%description doc
+This package contains the automatically generated documentation for the
+oVirt Engine Software Development Kit.
+
 %prep
 %setup -q -n %{name}
 
@@ -30,7 +39,25 @@
 sed -i 1d src/ovirtsdk/xml/params.py
 
 %build
+
+# Build the package:
 %{__python} setup.py build
+
+# Generate the documentation:
+sphinx-apidoc \
+  -H 'oVirt Engine Python SDK' \
+  -A 'oVirt' \
+  -V '3.6' \
+  -F \
+  -f \
+  -o doc \
+  src
+
+# Convert the generated documentation to HTML:
+sphinx-build \
+  -b html \
+  doc \
+  html
 
 %install
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
@@ -42,6 +69,9 @@
 %doc LICENSE.txt
 %doc README.md
 
+%files doc
+%doc html
+
 %changelog
 * Tue Oct 28 2014 Juan Hernandez <[email protected]> - 3.6.0.0-0
 - Add empty export method to decorator base #1024696.


-- 
To view, visit https://gerrit.ovirt.org/39186
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0243488fb8349c127eadcd0e940bf462a45b449
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to