1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: =?utf-8?b?T3R0byBLZWvDpGzDpGluZW4=?= <otto@debian.org>
Date: Thu, 18 Sep 2025 19:04:11 +0000
Subject: Mock `eth_abi` for Sphinx autodoc
Mock the import to allow Sphinx to generate documentation stubs for
`eth_abi` without requiring the actual package to be installed, ensuring
the documentation is complete and does not emit warnings like:
ModuleNotFoundError: No module named 'eth_abi'
This does not need to upstreamed as the upstream builds likely have
access to all possible modules.
Forwarded: not-needed
---
docs/conf.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/conf.py b/docs/conf.py
index bbb59c4..cbec1e0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -106,6 +106,11 @@ pygments_style = "sphinx"
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
+# A list of modules to be mocked up. This is useful if your code base uses
+# external libraries that are not installed on the system where the docs
+# are being built.
+autodoc_mock_imports = ["eth_abi"]
+
# -- Options for HTML output ----------------------------------------------
|