mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
docs: bring some order to our Python module hierarchy
Now that we have tools/lib/python for our Python modules, turn them into proper packages with a single namespace so that everything can just use tools/lib/python in sys.path. No functional change. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251110220430.726665-3-corbet@lwn.net>
This commit is contained in:
@@ -111,7 +111,7 @@ import sys
|
||||
|
||||
# Import Python modules
|
||||
|
||||
LIB_DIR = "../tools/lib/python/kdoc"
|
||||
LIB_DIR = "../tools/lib/python"
|
||||
SRC_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR))
|
||||
@@ -292,8 +292,8 @@ def main():
|
||||
logger.warning("Python 3.7 or later is required for correct results")
|
||||
|
||||
# Import kernel-doc libraries only after checking Python version
|
||||
from kdoc_files import KernelFiles # pylint: disable=C0415
|
||||
from kdoc_output import RestFormat, ManFormat # pylint: disable=C0415
|
||||
from kdoc.kdoc_files import KernelFiles # pylint: disable=C0415
|
||||
from kdoc.kdoc_output import RestFormat, ManFormat # pylint: disable=C0415
|
||||
|
||||
if args.man:
|
||||
out_style = ManFormat(modulename=args.modulename)
|
||||
|
||||
Reference in New Issue
Block a user