Update info on autodoc_mock_imports
Tries to make it clearer when module name needs to be inserted manually.
@@ -45,13 +45,19 @@ extensions = [
req_path = os.path.join(os.path.dirname(os.path.dirname(
os.path.realpath(__file__))), 'requirements', 'requirements.txt')
+# To easily run sphinx without additional installation autodoc_mock_imports
+# sets modules to mock.
+
+# Step 1: Pull module names to mock from requirements
# Assuming package name is the same as the module name
with open(req_path) as f:
autodoc_mock_imports = map(str.strip, re.findall(r'^\s*[a-zA-Z_]*',
f.read().lower().replace('-', '_'),
flags=re.MULTILINE))
-# Dependencies with different module names
+# Step 2: Add custom names
+# Not all module names match the package name (as stated in requirements.txt)
+# this adds the modules whose names don't match the package name.
autodoc_mock_imports = list(autodoc_mock_imports) + [
'adapt',
'alsaaudio',
