doc/conf.py: use "sphinx_rtd_theme" only if it is installed
Don't fail at build time only because the RTD scheme is not installed. Such a problem should be detected at configure time.
This commit is contained in:
1
NEWS
1
NEWS
@@ -3,6 +3,7 @@ ver 0.24.1 (not yet released)
|
||||
- sndio: fix rounding error in volume calculation
|
||||
* log: include year in time stamp
|
||||
* fix build failure in the "id3tag" Meson subproject
|
||||
* doc: use "sphinx_rtd_theme" only if it is installed
|
||||
|
||||
ver 0.24 (2025/03/11)
|
||||
* protocol
|
||||
|
@@ -105,6 +105,13 @@ todo_include_todos = False
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
try:
|
||||
__import__(html_theme)
|
||||
except ModuleNotFoundError:
|
||||
import sys
|
||||
print(f"Warning: Sphinx theme {html_theme!r} not available, falling back to the default theme", file=sys.stderr)
|
||||
del 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
|
||||
# documentation.
|
||||
|
Reference in New Issue
Block a user