misc: Add sphinx stdlib documentation (#335)
This PR adds documentation to the standard library using Sphinx. For details on how the documentation was generated, refer to https://gem5.atlassian.net/browse/GEM5-1314. Currently, some modules like `dramsys` and `mesi_three_level` appear as blank pages. To view the current state of the documentation locally, run: `cd docs/_build/html; python3 -m http.server 8000` --------- Co-authored-by: ivanaamit <ivanamit91@gmail.com>
This commit is contained in:
committed by
Bobby R. Bruce
parent
b6c941c9ca
commit
e146f1b2bc
14
docs/gem5-sphinx-apidoc
Normal file
14
docs/gem5-sphinx-apidoc
Normal file
@@ -0,0 +1,14 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
extensions = ['myst_parser']
|
||||
|
||||
source_suffix = {
|
||||
'.md': 'markdown',
|
||||
'.py': 'markdown'
|
||||
}
|
||||
|
||||
from sphinx.ext.apidoc import main
|
||||
if __name__ == '__m5_main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user