Fix import issues with qrcode in sphinx 7.2 (#552)
* 7.2 introduces the issue * mock module qrcode for documentation build This prevents issues with sphinx 7.2
This commit is contained in:
parent
3177c8d411
commit
c11d192e65
|
@ -34,6 +34,7 @@ root = os.path.relpath(os.path.join(os.path.dirname(__file__), ".."))
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
|
"sphinx_autodoc_typehints",
|
||||||
"sphinx.ext.doctest",
|
"sphinx.ext.doctest",
|
||||||
"sphinx.ext.todo",
|
"sphinx.ext.todo",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
|
@ -46,6 +47,9 @@ extensions = [
|
||||||
"sphinxcontrib.spelling",
|
"sphinxcontrib.spelling",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# mock the following modules for autodoc
|
||||||
|
autodoc_mock_imports = ["qrcode"]
|
||||||
|
|
||||||
# supress warnings for external images
|
# supress warnings for external images
|
||||||
suppress_warnings = [
|
suppress_warnings = [
|
||||||
"image.nonlocal_uri",
|
"image.nonlocal_uri",
|
||||||
|
|
|
@ -11,4 +11,5 @@ python-barcode>=0.11.0,<1
|
||||||
importlib-metadata
|
importlib-metadata
|
||||||
importlib_resources
|
importlib_resources
|
||||||
sphinxcontrib.datatemplates
|
sphinxcontrib.datatemplates
|
||||||
|
sphinx-autodoc-typehints
|
||||||
pycups
|
pycups
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -30,11 +30,12 @@ setenv = PY_IGNORE_IMPORTMISMATCH=1
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python
|
basepython = python
|
||||||
changedir = doc
|
changedir = doc
|
||||||
deps = sphinx>=3.0.0
|
deps = sphinx>=7.2.3
|
||||||
setuptools_scm
|
setuptools_scm
|
||||||
python-barcode
|
python-barcode
|
||||||
sphinxcontrib-spelling>=7.2.0
|
sphinxcontrib-spelling>=7.2.0
|
||||||
sphinxcontrib.datatemplates
|
sphinxcontrib.datatemplates
|
||||||
|
sphinx-autodoc-typehints
|
||||||
sphinx_rtd_theme
|
sphinx_rtd_theme
|
||||||
pycups
|
pycups
|
||||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||||
|
|
Loading…
Reference in New Issue