Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: enable Sphinx autodoc extension to allow documenting python

Adding python documentation is simple with Sphinx: all we need
is to include the ext.autodoc extension and add the directories
where the Python code sits at the sys.path.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <29cbe375dc418d6fa5793f55199799b5b52dcd38.1768838938.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
6a4931a7 f123cffb

+5
+5
Documentation/conf.py
··· 19 19 # Add location of Sphinx extensions 20 20 sys.path.insert(0, os.path.join(kern_doc_dir, "sphinx")) 21 21 22 + # Allow sphinx.ext.autodoc to document files at tools and scripts 23 + sys.path.append(os.path.join(kern_doc_dir, "..", "tools")) 24 + sys.path.append(os.path.join(kern_doc_dir, "..", "scripts")) 25 + 22 26 # Minimal supported version 23 27 needs_sphinx = "3.4.3" 24 28 ··· 156 152 "maintainers_include", 157 153 "parser_yaml", 158 154 "rstFlatTable", 155 + "sphinx.ext.autodoc", 159 156 "sphinx.ext.autosectionlabel", 160 157 "sphinx.ext.ifconfig", 161 158 "translations",