History

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.

Jonathan Corbet committed 1 year ago

Commit 992a9df1 parent 778b8eb18 files · +34 −35Browse files

Showing the changes to scripts (1 of 18 files). Show all

Unified · Split

scripts/kernel-doc.py+3−3
@@ -111,7 +111,7 @@ import sys · 110 unmodified lines
111 111
112# Import Python modules112# Import Python modules
113 113
114LIB_DIR = "../tools/lib/python/kdoc"114LIB_DIR = "../tools/lib/python"
115SRC_DIR = os.path.dirname(os.path.realpath(__file__))115SRC_DIR = os.path.dirname(os.path.realpath(__file__))
116 116
117sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR))117sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR))
@@ -292,8 +292,8 @@ def main(): · 174 unmodified lines
292 logger.warning("Python 3.7 or later is required for correct results")292 logger.warning("Python 3.7 or later is required for correct results")
293 293
294 # Import kernel-doc libraries only after checking Python version294 # Import kernel-doc libraries only after checking Python version
295 from kdoc_files import KernelFiles # pylint: disable=C0415295 from kdoc.kdoc_files import KernelFiles # pylint: disable=C0415
296 from kdoc_output import RestFormat, ManFormat # pylint: disable=C0415296 from kdoc.kdoc_output import RestFormat, ManFormat # pylint: disable=C0415
297 297
298 if args.man:298 if args.man:
299 out_style = ManFormat(modulename=args.modulename)299 out_style = ManFormat(modulename=args.modulename)