diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2025-11-18 19:26:11 +0300 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2025-11-18 19:26:11 +0300 |
| commit | 34a28245b6a5c4227b7122c0ff9b98d22b39f033 (patch) | |
| tree | 5f1e928a65d14b06b264b4c381b032acc1a6dbd3 /scripts/kernel-doc.py | |
| parent | f690e07859e67505e7106ef5b4fae5e8b71b2109 (diff) | |
| parent | 992a9df41ad7173588bf90e15b33d45db2811aea (diff) | |
| download | linux-34a28245b6a5c4227b7122c0ff9b98d22b39f033.tar.xz | |
Merge branch 'python-modules' into docs-mw
scripts/lib was always a bit of an awkward place for Python libraries; give
them a proper home under tools/lib/python. Put the modules from
tools/docs/lib there for good measure.
The second patch ties them into a single package namespace. It would be
more aesthetically pleasing to add a kernel layer, so we could say:
from kernel.kdoc import kdoc_parser
...and have the kernel-specific stuff clearly marked, but that means adding
an empty directory in the hierarchy, which isn't as pleasing.
There are some other "Python library" directories hidden in the kernel
tree; we may eventually want to encourage them to move as well.
Diffstat (limited to 'scripts/kernel-doc.py')
| -rwxr-xr-x | scripts/kernel-doc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kernel-doc.py b/scripts/kernel-doc.py index d9fe2bcbd39c..7a1eaf986bcd 100755 --- a/scripts/kernel-doc.py +++ b/scripts/kernel-doc.py @@ -111,7 +111,7 @@ import sys # Import Python modules -LIB_DIR = "lib/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) |
