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: conf: don't rely on cwd to get documentation location

Instead of relying that Sphinx will be called from Documentation/
dir, pick the location based on __file__.

Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <34c38718dfade91ff6f7afca5e9c1705ba253c97.1768838938.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
f123cffb d0b31c30

+5 -7
+5 -7
Documentation/conf.py
··· 13 13 14 14 import sphinx 15 15 16 - # If extensions (or modules to document with autodoc) are in another directory, 17 - # add these directories to sys.path here. If the directory is relative to the 18 - # documentation root, use os.path.abspath to make it absolute, like shown here. 19 - sys.path.insert(0, os.path.abspath("sphinx")) 16 + # Location of Documentation/ directory 17 + kern_doc_dir = os.path.dirname(os.path.abspath(__file__)) 18 + 19 + # Add location of Sphinx extensions 20 + sys.path.insert(0, os.path.join(kern_doc_dir, "sphinx")) 20 21 21 22 # Minimal supported version 22 23 needs_sphinx = "3.4.3" ··· 32 31 has_include_patterns = True 33 32 # Include patterns that don't contain directory names, in glob format 34 33 include_patterns = ["**.rst"] 35 - 36 - # Location of Documentation/ directory 37 - kern_doc_dir = os.path.abspath(".") 38 34 39 35 # Exclude of patterns that don't contain directory names, in glob format. 40 36 exclude_patterns = []