File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 99# full list see the documentation:
1010# http://www.sphinx-doc.org/en/master/config
1111
12+ import importlib .util
1213import os
1314import sys
1415from datetime import datetime
16+ from importlib .metadata import version as get_version
1517
1618import jsonschema2md
1719
18- import fusesoc
1920from fusesoc .capi2 .json_schema import capi2_schema
2021from fusesoc .utils import yaml_read
2122
3435copyright = f"2018-{ datetime .now ().year } , Olof Kindgren"
3536author = "Olof Kindgren"
3637
37- from importlib .metadata import version as get_version
38-
3938# The full version, including alpha/beta/rc tags.
4039release : str = get_version ("fusesoc" )
4140
109108# or
110109# - apt-get install python-sphinx-rtd-theme
111110
112- try :
113- import sphinx_rtd_theme
114-
111+ if importlib .util .find_spec ("sphinx_rtd_theme" ) is not None :
115112 html_theme = "sphinx_rtd_theme"
116- except ImportError :
113+ else :
117114 sys .stderr .write (
118115 "Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was "
119116 + "not found. Make sure you have the theme installed to produce pretty "
You can’t perform that action at this time.
0 commit comments