DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: fix sphinx rtd theme import in GHA
@ 2021-04-01 19:58 David Marchand
  2021-04-01 20:37 ` Aaron Conole
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2021-04-01 19:58 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, stable, John McNamara

If the rtd theme is available, passing it by name is enough to select
it. Sphinx itself recognises the "sphinx_rtd_theme" name as a special
case and tries to find its path automatically.

On the other hand, passing a html_theme_path makes sphinx parse all
themes availables in this path, which in some environment (like GHA) is
/usr/share and makes sphinx error on the first zipfile it finds (in GHA,
some Azure CLI thingy) that has no sphinx theme in it.

Fixes: 46562be65094 ("doc: import sphinx rtd theme when available")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/conf.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index aceeb62a4f..ec59aeae7e 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -20,7 +20,6 @@
     import sphinx_rtd_theme
 
     html_theme = "sphinx_rtd_theme"
-    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 except:
     print('Install the sphinx ReadTheDocs theme for improved html documentation '
           'layout: https://sphinx-rtd-theme.readthedocs.io/',
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: fix sphinx rtd theme import in GHA
  2021-04-01 19:58 [dpdk-dev] [PATCH] doc: fix sphinx rtd theme import in GHA David Marchand
@ 2021-04-01 20:37 ` Aaron Conole
  2021-04-01 23:59   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2021-04-01 20:37 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, stable, John McNamara

David Marchand <david.marchand@redhat.com> writes:

> If the rtd theme is available, passing it by name is enough to select
> it. Sphinx itself recognises the "sphinx_rtd_theme" name as a special
> case and tries to find its path automatically.
>
> On the other hand, passing a html_theme_path makes sphinx parse all
> themes availables in this path, which in some environment (like GHA) is
> /usr/share and makes sphinx error on the first zipfile it finds (in GHA,
> some Azure CLI thingy) that has no sphinx theme in it.
>
> Fixes: 46562be65094 ("doc: import sphinx rtd theme when available")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

https://github.com/ovsrobot/dpdk/tree/series_16066
https://github.com/ovsrobot/dpdk/actions/runs/709682570

Acked-by: Aaron Conole <aconole@redhat.com>

>  doc/guides/conf.py | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/doc/guides/conf.py b/doc/guides/conf.py
> index aceeb62a4f..ec59aeae7e 100644
> --- a/doc/guides/conf.py
> +++ b/doc/guides/conf.py
> @@ -20,7 +20,6 @@
>      import sphinx_rtd_theme
>  
>      html_theme = "sphinx_rtd_theme"
> -    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
>  except:
>      print('Install the sphinx ReadTheDocs theme for improved html documentation '
>            'layout: https://sphinx-rtd-theme.readthedocs.io/',


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: fix sphinx rtd theme import in GHA
  2021-04-01 20:37 ` Aaron Conole
@ 2021-04-01 23:59   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-04-01 23:59 UTC (permalink / raw)
  To: David Marchand, Aaron Conole; +Cc: dev, stable, John McNamara

01/04/2021 22:37, Aaron Conole:
> David Marchand <david.marchand@redhat.com> writes:
> 
> > If the rtd theme is available, passing it by name is enough to select
> > it. Sphinx itself recognises the "sphinx_rtd_theme" name as a special
> > case and tries to find its path automatically.
> >
> > On the other hand, passing a html_theme_path makes sphinx parse all
> > themes availables in this path, which in some environment (like GHA) is
> > /usr/share and makes sphinx error on the first zipfile it finds (in GHA,
> > some Azure CLI thingy) that has no sphinx theme in it.
> >
> > Fixes: 46562be65094 ("doc: import sphinx rtd theme when available")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> 
> https://github.com/ovsrobot/dpdk/tree/series_16066
> https://github.com/ovsrobot/dpdk/actions/runs/709682570
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Applied, thanks for the quick workaround.

This patch is removing html_theme_path,
not sure in which situation it was useful.
Future will tell.

From sphinx doc:
"
If the theme does not come with Sphinx, it can be in two static forms or as a Python package. For the static forms, either a directory (containing theme.conf and other needed files), or a zip file with the same contents is supported. The directory or zipfile must be put where Sphinx can find it; for this there is the config value html_theme_path. This can be a list of directories, relative to the directory containing conf.py, that can contain theme directories or zip files.
"




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-01 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 19:58 [dpdk-dev] [PATCH] doc: fix sphinx rtd theme import in GHA David Marchand
2021-04-01 20:37 ` Aaron Conole
2021-04-01 23:59   ` Thomas Monjalon

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).