qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PULL v2 0/1] readthedoc theme patch
Date: Thu, 13 May 2021 20:03:31 +0400	[thread overview]
Message-ID: <CAJ+F1C+V=x8=tcm0WhtFxS5P_4WjLNVXOVKEnvgWpmFDwom6-Q@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA8qV0Re8AYHpW14-1wkUcGacO7E6+ta-DWwj-9pN0iVOw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

Hi

On Thu, May 13, 2021 at 5:45 PM Peter Maydell <peter.maydell@linaro.org>
wrote:

> On Wed, 12 May 2021 at 20:31, Peter Maydell <peter.maydell@linaro.org>
> wrote:
> > I should be able to deal with this by installing the rtd theme on
> > the host. I'll retry merging the pullreq.
>
> On try 2 I find that some of my machines warn:
>
> Program qemu-keymap found: NO
> Program sphinx-build found: YES
> ../../docs/meson.build:30: WARNING: /usr/bin/sphinx-build:
> Theme error:
> unsupported theme option 'style_nav_header_background' given
>
> Program python3 found: YES (/usr/bin/python3)
> Program diff found: YES
>
> It looks like this is because it's trying to use an option
> that's only present in newer versions of the theme. (Ubuntu
> bionic has version 0.2.4 of the rtd theme.)
>
> Is it possible to either avoid or conditionalize the use of
> this config setting?
>
>
This should work, can you check?:

diff --git a/docs/conf.py b/docs/conf.py
index 3802b70d62..9e3d7cee0e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -29,6 +29,7 @@
 import os
 import sys
 import sphinx
+from packaging.version import parse as parse_version
 from sphinx.errors import ConfigError

 # Make Sphinx fail cleanly if using an old Python, rather than obscurely
@@ -162,7 +163,7 @@
 # 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
 # documentation.
-if html_theme == 'sphinx_rtd_theme':
+if parse_version(sphinx_rtd_theme.__version__) >= parse_version('0.4.3'):
     html_theme_options = {
         "style_nav_header_background": "#802400",
     }

However, we agreed before to not have support fallbacks for missing deps.
Perhaps we should require rtd >= 0.4.3 instead?

thanks again!

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2690 bytes --]

  reply	other threads:[~2021-05-13 16:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 13:06 [PULL v2 0/1] readthedoc theme patch marcandre.lureau
2021-05-10 13:06 ` [PULL v2 1/1] sphinx: adopt kernel readthedoc theme marcandre.lureau
2021-05-12 13:43 ` [PULL v2 0/1] readthedoc theme patch Peter Maydell
2021-05-12 15:17   ` Marc-André Lureau
2021-05-12 15:54     ` Peter Maydell
2021-05-12 16:02       ` Marc-André Lureau
2021-05-12 16:17         ` Peter Maydell
2021-05-12 19:31           ` Peter Maydell
2021-05-13 13:45             ` Peter Maydell
2021-05-13 16:03               ` Marc-André Lureau [this message]
2021-05-13 17:17                 ` Peter Maydell
2021-05-14  8:00                   ` Marc-André Lureau
2021-05-14  9:10                     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ+F1C+V=x8=tcm0WhtFxS5P_4WjLNVXOVKEnvgWpmFDwom6-Q@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).