Only use inkscapeconverter if inkscape installed
This commit is contained in:
parent
e929d15848
commit
b46d5f4657
|
@ -17,6 +17,7 @@
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
import ast
|
import ast
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
@ -55,9 +56,15 @@ extensions = [
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_removed_in",
|
"sphinx_removed_in",
|
||||||
"sphinxcontrib_trio",
|
"sphinxcontrib_trio",
|
||||||
"sphinxcontrib.inkscapeconverter",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Building PDF docs on readthedocs requires inkscape for svg to pdf
|
||||||
|
# conversion. The relevant plugin is not useful for normal HTML builds, but
|
||||||
|
# it still raises warnings and fails CI if inkscape is not available. So
|
||||||
|
# only use the plugin if inkscape is actually available.
|
||||||
|
if shutil.which('inkscape'):
|
||||||
|
extensions.append("sphinxcontrib.inkscapeconverter")
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ["_templates"]
|
templates_path = ["_templates"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue