You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2014/09/27 20:21:44 UTC
[4/4] git commit: Also generate api docs files on readthedocs.
Also generate api docs files on readthedocs.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0a1f67b3
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0a1f67b3
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0a1f67b3
Branch: refs/heads/trunk
Commit: 0a1f67b329f5627bad14f82a4b923e8d29a5e890
Parents: 7aae760
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Sep 27 20:16:06 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Sep 27 20:16:06 2014 +0200
----------------------------------------------------------------------
docs/conf.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a1f67b3/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index ae5ea97..093854a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -12,6 +12,14 @@
# serve to show the default.
import sys, os
+import subprocess
+
+# Detect if we are running on read the docs
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if on_rtd:
+ cmd = 'sphinx-apidoc -d 2 -o apidocs/ ../libcloud/'
+ subprocess.call(cmd, shell=True)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -95,7 +103,6 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
html_theme = 'default'