Skip to content

Commit de6fb95

Browse files
authored
Merge pull request #87 from dihm/docs_mock_imports
Mock `labscript_utils` to prevent RTD from trying to launch zprocess.
2 parents 763a0f1 + aadd476 commit de6fb95

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@
1515
from m2r import MdInclude
1616
from recommonmark.transform import AutoStructify
1717
from jinja2 import FileSystemLoader, Environment
18+
try:
19+
import importlib.metadata as importlib_metadata
20+
except ImportError:
21+
import importlib_metadata
1822

1923
# -- Project information (unique to each project) -------------------------------------
2024

2125
project = "labscript"
2226
copyright = "2020, labscript suite"
2327
author = "labscript suite contributors"
2428

25-
from labscript import __version__ as version # noqa: E402
29+
version = importlib_metadata.version('labscript')
2630

2731
release = version
2832

@@ -51,6 +55,7 @@
5155
autodoc_typehints = 'description'
5256
autosummary_generate = True
5357
add_module_names = False
58+
autodoc_mock_imports = ['labscript_utils']
5459

5560
# Prefix each autosectionlabel with the name of the document it is in and a colon
5661
autosectionlabel_prefix_document = True

0 commit comments

Comments
 (0)