Message ID | 20210510130617.320981-1-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
On Mon, 10 May 2021 at 14:06, <marcandre.lureau@redhat.com> wrote: > > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > The following changes since commit d90f154867ec0ec22fd719164b88716e8fd48672: > > Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 20:29:14 +0100) > > are available in the Git repository at: > > git@gitlab.com:marcandre.lureau/qemu.git tags/rtd-pull-request > > for you to fetch changes up to f1852f5d7e6fc2ead874261c0388b18898257000: > > sphinx: adopt kernel readthedoc theme (2021-05-10 15:12:09 +0400) > > ---------------------------------------------------------------- > Pull request > > ---------------------------------------------------------------- > > Marc-André Lureau (1): > sphinx: adopt kernel readthedoc theme NetBSD now complains: Configuring 60-edk2-x86_64.json using configuration Program qemu-keymap found: NO Program sphinx-build found: YES ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: Configuration error: There is a programable error in your configuration file: Traceback (most recent call last): File "conf.py", line 154, in <module> import sphinx_rtd_theme ModuleNotFoundError: No module named 'sphinx_rtd_theme' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in __init__ execfile_(filename, config) File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "conf.py", line 157, in <module> 'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n' sphinx.errors.ConfigError: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Program python3 found: YES (/usr/bin/python3) Program diff found: YES Program dbus-daemon found: YES as does freebsd and openbsd. Can we get the theme added to the VM configs for those ? -- PMM
Hi On Wed, May 12, 2021 at 5:47 PM Peter Maydell <peter.maydell@linaro.org> wrote: > On Mon, 10 May 2021 at 14:06, <marcandre.lureau@redhat.com> wrote: > > > > From: Marc-André Lureau <marcandre.lureau@redhat.com> > > > > The following changes since commit > d90f154867ec0ec22fd719164b88716e8fd48672: > > > > Merge remote-tracking branch > 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 > 20:29:14 +0100) > > > > are available in the Git repository at: > > > > git@gitlab.com:marcandre.lureau/qemu.git tags/rtd-pull-request > > > > for you to fetch changes up to f1852f5d7e6fc2ead874261c0388b18898257000: > > > > sphinx: adopt kernel readthedoc theme (2021-05-10 15:12:09 +0400) > > > > ---------------------------------------------------------------- > > Pull request > > > > ---------------------------------------------------------------- > > > > Marc-André Lureau (1): > > sphinx: adopt kernel readthedoc theme > > NetBSD now complains: > > Configuring 60-edk2-x86_64.json using configuration > Program qemu-keymap found: NO > Program sphinx-build found: YES > ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: > Configuration error: > There is a programable error in your configuration file: > > Traceback (most recent call last): > File "conf.py", line 154, in <module> > import sphinx_rtd_theme > ModuleNotFoundError: No module named 'sphinx_rtd_theme' > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in > __init__ > execfile_(filename, config) > File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line > 150, in execfile_ > exec_(code, _globals) > File "conf.py", line 157, in <module> > 'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n' > sphinx.errors.ConfigError: The Sphinx 'sphinx_rtd_theme' HTML theme > was not found. > > > > Program python3 found: YES (/usr/bin/python3) > Program diff found: YES > Program dbus-daemon found: YES > > > as does freebsd and openbsd. Can we get the theme added to the VM > configs for those ? > > What is used for the BSD configs? If it's tests/vm, I don't see readthedoc being installed there, and vm-build-* should work (at least some work for me, freebsd fails with ssh issue here)
On Wed, 12 May 2021 at 16:17, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > > Hi > > On Wed, May 12, 2021 at 5:47 PM Peter Maydell <peter.maydell@linaro.org> wrote: >> >> On Mon, 10 May 2021 at 14:06, <marcandre.lureau@redhat.com> wrote: >> > >> > From: Marc-André Lureau <marcandre.lureau@redhat.com> >> > >> > The following changes since commit d90f154867ec0ec22fd719164b88716e8fd48672: >> > >> > Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 20:29:14 +0100) >> > >> > are available in the Git repository at: >> > >> > git@gitlab.com:marcandre.lureau/qemu.git tags/rtd-pull-request >> > >> > for you to fetch changes up to f1852f5d7e6fc2ead874261c0388b18898257000: >> > >> > sphinx: adopt kernel readthedoc theme (2021-05-10 15:12:09 +0400) >> > >> > ---------------------------------------------------------------- >> > Pull request >> > >> > ---------------------------------------------------------------- >> > >> > Marc-André Lureau (1): >> > sphinx: adopt kernel readthedoc theme >> >> NetBSD now complains: >> >> Configuring 60-edk2-x86_64.json using configuration >> Program qemu-keymap found: NO >> Program sphinx-build found: YES >> ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: >> Configuration error: >> There is a programable error in your configuration file: >> >> Traceback (most recent call last): >> File "conf.py", line 154, in <module> >> import sphinx_rtd_theme >> ModuleNotFoundError: No module named 'sphinx_rtd_theme' >> >> During handling of the above exception, another exception occurred: >> >> Traceback (most recent call last): >> File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in __init__ >> execfile_(filename, config) >> File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line >> 150, in execfile_ >> exec_(code, _globals) >> File "conf.py", line 157, in <module> >> 'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n' >> sphinx.errors.ConfigError: The Sphinx 'sphinx_rtd_theme' HTML theme >> was not found. >> >> >> >> Program python3 found: YES (/usr/bin/python3) >> Program diff found: YES >> Program dbus-daemon found: YES >> >> >> as does freebsd and openbsd. Can we get the theme added to the VM >> configs for those ? > What is used for the BSD configs? If it's tests/vm, I don't see readthedoc being installed there, and vm-build-* should work (at least some work for me, freebsd fails with ssh issue here) It's tests/vm. The build doesn't fail, but the printing of the WARNING is caught by my wrapper scripts (which grep for various warning/error words to catch issues which don't trigger complete build failures). Adding the theme to the configs would mean that we can continue to test docs builds on those platforms. thanks -- PMM
Hi On Wed, May 12, 2021 at 7:56 PM Peter Maydell <peter.maydell@linaro.org> wrote: > On Wed, 12 May 2021 at 16:17, Marc-André Lureau > <marcandre.lureau@gmail.com> wrote: > > > > Hi > > > > On Wed, May 12, 2021 at 5:47 PM Peter Maydell <peter.maydell@linaro.org> > wrote: > >> > >> On Mon, 10 May 2021 at 14:06, <marcandre.lureau@redhat.com> wrote: > >> > > >> > From: Marc-André Lureau <marcandre.lureau@redhat.com> > >> > > >> > The following changes since commit > d90f154867ec0ec22fd719164b88716e8fd48672: > >> > > >> > Merge remote-tracking branch > 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 > 20:29:14 +0100) > >> > > >> > are available in the Git repository at: > >> > > >> > git@gitlab.com:marcandre.lureau/qemu.git tags/rtd-pull-request > >> > > >> > for you to fetch changes up to > f1852f5d7e6fc2ead874261c0388b18898257000: > >> > > >> > sphinx: adopt kernel readthedoc theme (2021-05-10 15:12:09 +0400) > >> > > >> > ---------------------------------------------------------------- > >> > Pull request > >> > > >> > ---------------------------------------------------------------- > >> > > >> > Marc-André Lureau (1): > >> > sphinx: adopt kernel readthedoc theme > >> > >> NetBSD now complains: > >> > >> Configuring 60-edk2-x86_64.json using configuration > >> Program qemu-keymap found: NO > >> Program sphinx-build found: YES > >> ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: > >> Configuration error: > >> There is a programable error in your configuration file: > >> > >> Traceback (most recent call last): > >> File "conf.py", line 154, in <module> > >> import sphinx_rtd_theme > >> ModuleNotFoundError: No module named 'sphinx_rtd_theme' > >> > >> During handling of the above exception, another exception occurred: > >> > >> Traceback (most recent call last): > >> File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in > __init__ > >> execfile_(filename, config) > >> File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line > >> 150, in execfile_ > >> exec_(code, _globals) > >> File "conf.py", line 157, in <module> > >> 'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n' > >> sphinx.errors.ConfigError: The Sphinx 'sphinx_rtd_theme' HTML theme > >> was not found. > >> > >> > >> > >> Program python3 found: YES (/usr/bin/python3) > >> Program diff found: YES > >> Program dbus-daemon found: YES > >> > >> > >> as does freebsd and openbsd. Can we get the theme added to the VM > >> configs for those ? > > > What is used for the BSD configs? If it's tests/vm, I don't see > readthedoc being installed there, and vm-build-* should work (at least some > work for me, freebsd fails with ssh issue here) > > It's tests/vm. The build doesn't fail, but the printing of the WARNING > is caught by my wrapper scripts (which grep for various warning/error > words to catch issues which don't trigger complete build failures). > Adding the theme to the configs would mean that we can continue to > test docs builds on those platforms. > Didn't you install readthedoc manually there? I don't see those warnings.
On Wed, 12 May 2021 at 17:02, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > On Wed, May 12, 2021 at 7:56 PM Peter Maydell <peter.maydell@linaro.org> wrote: >> >> NetBSD now complains: >> >> >> >> Configuring 60-edk2-x86_64.json using configuration >> >> Program qemu-keymap found: NO >> >> Program sphinx-build found: YES >> >> ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: >> >> Configuration error: >> >> There is a programable error in your configuration file: >> >> >> >> Traceback (most recent call last): >> >> File "conf.py", line 154, in <module> >> >> import sphinx_rtd_theme >> >> ModuleNotFoundError: No module named 'sphinx_rtd_theme' >> >> >> >> During handling of the above exception, another exception occurred: >> >> >> >> Traceback (most recent call last): >> >> File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in __init__ >> >> execfile_(filename, config) >> >> File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line >> >> 150, in execfile_ >> >> exec_(code, _globals) >> >> File "conf.py", line 157, in <module> >> >> 'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n' >> >> sphinx.errors.ConfigError: The Sphinx 'sphinx_rtd_theme' HTML theme >> >> was not found. >> >> >> >> >> >> >> >> Program python3 found: YES (/usr/bin/python3) >> >> Program diff found: YES >> >> Program dbus-daemon found: YES >> >> >> >> >> >> as does freebsd and openbsd. Can we get the theme added to the VM >> >> configs for those ? >> >> > What is used for the BSD configs? If it's tests/vm, I don't see readthedoc being installed there, and vm-build-* should work (at least some work for me, freebsd fails with ssh issue here) >> >> It's tests/vm. The build doesn't fail, but the printing of the WARNING >> is caught by my wrapper scripts (which grep for various warning/error >> words to catch issues which don't trigger complete build failures). >> Adding the theme to the configs would mean that we can continue to >> test docs builds on those platforms. > > > Didn't you install readthedoc manually there? I don't see those warnings. No, I don't install anything manually on the BSD VM setups -- I just use the tests/vm makefile magic to run a build-and-test. thanks -- PMM
On Wed, 12 May 2021 at 17:17, Peter Maydell <peter.maydell@linaro.org> wrote: > > On Wed, 12 May 2021 at 17:02, Marc-André Lureau > <marcandre.lureau@gmail.com> wrote: > > On Wed, May 12, 2021 at 7:56 PM Peter Maydell <peter.maydell@linaro.org> wrote: > >> >> NetBSD now complains: > >> >> > >> >> Configuring 60-edk2-x86_64.json using configuration > >> >> Program qemu-keymap found: NO > >> >> Program sphinx-build found: YES > >> >> ../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: > >> >> Configuration error: > >> >> There is a programable error in your configuration file: > >> >> > > > > Didn't you install readthedoc manually there? I don't see those warnings. > > No, I don't install anything manually on the BSD VM setups -- I just > use the tests/vm makefile magic to run a build-and-test. I've figured out what was going on here, and it was my mistake; I didn't look at the logs closely enough. When my scripts run 'make vm-build-netbsd' or whatever, this can trigger a configure run in the host, which is what is producing these warnings. The host makefile then goes on to launch the BSD VM and the inner configure run inside the VM is fine (as you note it doesn't have sphinx installed, so no docs are built.) I should be able to deal with this by installing the rtd theme on the host. I'll retry merging the pullreq. thanks -- PMM
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? thanks -- PMM
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!
On Thu, 13 May 2021 at 17:03, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > 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", > } This fails: ../../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: Configuration error: There is a programable error in your configuration file: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in __init__ execfile_(filename, config) File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "conf.py", line 32, in <module> from packaging.version import parse as parse_version ModuleNotFoundError: No module named 'packaging' > However, we agreed before to not have support fallbacks for missing deps. Perhaps we should require rtd >= 0.4.3 instead? That would prevent the docs from building on too many platforms, I think. 0.4.3 was only released upstream in Feb 2019. thanks -- PMM
Hi On Thu, May 13, 2021 at 9:17 PM Peter Maydell <peter.maydell@linaro.org> wrote: > On Thu, 13 May 2021 at 17:03, Marc-André Lureau > <marcandre.lureau@gmail.com> wrote: > > 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", > > } > > This fails: > > ../../docs/meson.build:30: WARNING: /usr/bin/sphinx-build: > Configuration error: > There is a programable error in your configuration file: > > Traceback (most recent call last): > File "/usr/lib/python3/dist-packages/sphinx/config.py", line 157, in > __init__ > execfile_(filename, config) > File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line > 150, in execfile_ > exec_(code, _globals) > File "conf.py", line 32, in <module> > from packaging.version import parse as parse_version > ModuleNotFoundError: No module named 'packaging' > > > According to SO ( https://stackoverflow.com/questions/11887762/how-do-i-compare-version-numbers-in-python) there is a second built-in option to compare versions. diff --git a/docs/conf.py b/docs/conf.py index 3802b70d62..00cf66ab54 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,7 @@ import os import sys import sphinx +from distutils.version import LooseVersion 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 LooseVersion(sphinx_rtd_theme.__version__) >= LooseVersion("0.4.3"): html_theme_options = { "style_nav_header_background": "#802400", } Let me know if you want a new PR. > > > However, we agreed before to not have support fallbacks for missing > deps. Perhaps we should require rtd >= 0.4.3 instead? > > That would prevent the docs from building on too many platforms, > I think. 0.4.3 was only released upstream in Feb 2019. > > Ok
On Fri, 14 May 2021 at 09:01, Marc-André Lureau <marcandre.lureau@gmail.com> wrote: > > Let me know if you want a new PR. If you could send a new PR that would be the easiest for me. thanks -- PMM
From: Marc-André Lureau <marcandre.lureau@redhat.com> The following changes since commit d90f154867ec0ec22fd719164b88716e8fd48672: Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging (2021-05-05 20:29:14 +0100) are available in the Git repository at: git@gitlab.com:marcandre.lureau/qemu.git tags/rtd-pull-request for you to fetch changes up to f1852f5d7e6fc2ead874261c0388b18898257000: sphinx: adopt kernel readthedoc theme (2021-05-10 15:12:09 +0400) ---------------------------------------------------------------- Pull request ---------------------------------------------------------------- Marc-André Lureau (1): sphinx: adopt kernel readthedoc theme docs/_templates/editpage.html | 5 - docs/conf.py | 51 ++++--- docs/devel/_templates/editpage.html | 5 - docs/interop/_templates/editpage.html | 5 - docs/meson.build | 5 +- docs/specs/_templates/editpage.html | 5 - docs/sphinx-static/theme_overrides.css | 161 +++++++++++++++++++++ docs/system/_templates/editpage.html | 5 - docs/tools/_templates/editpage.html | 5 - docs/user/_templates/editpage.html | 5 - tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/debian10.docker | 1 + tests/docker/dockerfiles/fedora.docker | 1 + tests/docker/dockerfiles/ubuntu.docker | 1 + tests/docker/dockerfiles/ubuntu1804.docker | 1 + tests/docker/dockerfiles/ubuntu2004.docker | 1 + 16 files changed, 199 insertions(+), 59 deletions(-) delete mode 100644 docs/_templates/editpage.html delete mode 100644 docs/devel/_templates/editpage.html delete mode 100644 docs/interop/_templates/editpage.html delete mode 100644 docs/specs/_templates/editpage.html create mode 100644 docs/sphinx-static/theme_overrides.css delete mode 100644 docs/system/_templates/editpage.html delete mode 100644 docs/tools/_templates/editpage.html delete mode 100644 docs/user/_templates/editpage.html