Author: Jonas Devlieghere
Date: 2023-08-16T09:14:42-07:00
New Revision: 5afa519c1ae9e17c3ac556b7ed42ab96b487ef0f

URL: 
https://github.com/llvm/llvm-project/commit/5afa519c1ae9e17c3ac556b7ed42ab96b487ef0f
DIFF: 
https://github.com/llvm/llvm-project/commit/5afa519c1ae9e17c3ac556b7ed42ab96b487ef0f.diff

LOG: [lldb] Print better error message when sphinx_automodapi is not installed

Print an error message with instructions on how to install
sphinx_automodapi.

Differential revision: https://reviews.llvm.org/D158022

Added: 
    

Modified: 
    lldb/docs/conf.py

Removed: 
    


################################################################################
diff  --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index 7c4c945f25babe..d326a253b0a012 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -49,6 +49,12 @@
 # Unless we only generate the basic manpage we need the plugin for generating
 # the Python API documentation.
 if not building_man_page:
+    try:
+        import sphinx_automodapi.automodapi
+    except ModuleNotFoundError:
+        print(
+            f"install sphinx_automodapi with {sys.executable} -m pip install 
sphinx_automodapi"
+        )
     extensions.append("sphinx_automodapi.automodapi")
 
 # Add any paths that contain templates here, relative to this directory.


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to