On Tue, 21 Jul 2015 at 13:44 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> 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 <[email protected]>
> ---
>  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
> --
> 2.4.3.573.g4eafbef
>
>
LGTM, thanks
-- 

Helga Velroyen
Software Engineer
[email protected]

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.

This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.

Reply via email to