[Pkg-ganeti-devel] [ganeti] 145/165: Support sphinx 1.3

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Aug 11 13:53:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository ganeti.

commit 268953c4cabdbed3f7f4959c01442fae8b132cc3
Author: Klaus Aehlig <aehlig at google.com>
Date:   Tue Jul 21 12:46:57 2015 +0200

    Support sphinx 1.3
    
    First, enable_manpages is now required to be a bool; fortunately,
    we set it via the environment in conf.py anyway, so no need to
    pass it as an option as well. Also, the default template has been
    renamed to classic; so branch on the sphinx version to choose the
    correct name. Fixes issue #1119.
    
    Signed-off-by: Klaus Aehlig <aehlig at google.com>
    Reviewed-by: Helga Velroyen <helgav at google.com>
---
 Makefile.am  | 7 ++++++-
 configure.ac | 3 +++
 doc/conf.py  | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 939f88c..265de5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1025,6 +1025,11 @@ doc/html/index.html: ENABLE_MANPAGES =
 doc/man-html/index.html: ENABLE_MANPAGES = 1
 doc/man-html/index.html: doc/manpages-enabled.rst $(mandocrst)
 
+if HAS_SPHINX_PRE13
+        SPHINX_HTML_THEME=default
+else
+        SPHINX_HTML_THEME=classic
+endif
 # Note: we use here an order-only prerequisite, as the contents of
 # _constants.py are not actually influencing the html build output: it
 # has to exist in order for the sphinx module to be loaded
@@ -1052,12 +1057,12 @@ endif
 	dir=$(dir $@) && \
 	@mkdir_p@ $$dir && \
 	PYTHONPATH=. ENABLE_MANPAGES=$(ENABLE_MANPAGES) COPY_DOC=1 \
+        HTML_THEME=$(SPHINX_HTML_THEME) \
 	$(RUN_IN_TEMPDIR) autotools/sphinx-wrapper $(SPHINX) -q -W -b html \
 	    -d . \
 	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
 	    -D release="$(PACKAGE_VERSION)" \
 	    -D graphviz_dot="$(DOT)" \
-	    -D enable_manpages="$(ENABLE_MANPAGES)" \
 	    doc $(CURDIR)/$$dir && \
 	rm -f $$dir/.buildinfo $$dir/objects.inv
 	touch $@
diff --git a/configure.ac b/configure.ac
index 1bf7962..ee6dcee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -517,6 +517,9 @@ else
   fi
 fi
 AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"])
+AM_CONDITIONAL([HAS_SPHINX_PRE13],
+ [test -n "$SPHINX" && echo "$sphinxver" | grep -q -E \
+  '^Sphinx([[[:space:]]]+|\(sphinx-build[[1-9]]?\)|v)*[[1-9]]\.[[0-2]]\.'])
 
 AC_ARG_ENABLE([manpages-in-doc],
   [AS_HELP_STRING([--enable-manpages-in-doc],
diff --git a/doc/conf.py b/doc/conf.py
index e73b753..15b848a 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -114,7 +114,7 @@ pygments_style = "sphinx"
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = "default"
+html_theme = os.getenv("HTML_THEME")
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list