Commit 778b8ebe authored by Jonathan Corbet's avatar Jonathan Corbet
Browse files

docs: Move the python libraries to tools/lib/python



"scripts/lib" was always a bit of an awkward place for Python modules.  We
already have tools/lib; create a tools/lib/python, move the libraries
there, and update the users accordingly.

While at it, move the contents of tools/docs/lib.  Rather than make another
directory, just put these documentation-oriented modules under "kdoc".

Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Message-ID: <20251110220430.726665-2-corbet@lwn.net>
parent f690e078
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
[MASTER]
init-hook='import sys; sys.path += ["scripts/lib/kdoc", "scripts/lib/abi", "tools/docs/lib"]'
init-hook='import sys; sys.path += ["tools/lib/python"]'
+1 −1
Original line number Diff line number Diff line
@@ -115,6 +115,6 @@ dochelp:
	@echo  '  make PAPER={a4|letter} Specifies the paper size used for LaTeX/PDF output.'
	@echo
	@echo  '  make FONTS_CONF_DENY_VF={path} sets a deny list to block variable Noto CJK fonts'
	@echo  '  for PDF build. See tools/docs/lib/latex_fonts.py for more details'
	@echo  '  for PDF build. See tools/lib/python/kdoc/latex_fonts.py for more details'
	@echo
	@echo  '  Default location for the generated documents is Documentation/output'
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ from sphinx.util.docutils import switch_source_input
from sphinx.util import logging

srctree = os.path.abspath(os.environ["srctree"])
sys.path.insert(0, os.path.join(srctree, "scripts/lib/abi"))
sys.path.insert(0, os.path.join(srctree, "tools/lib/python/abi"))

from abi_parser import AbiParser

+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
from sphinx.util import logging

srctree = os.path.abspath(os.environ["srctree"])
sys.path.insert(0, os.path.join(srctree, "tools/docs/lib"))
sys.path.insert(0, os.path.join(srctree, "tools/lib/python/kdoc"))

from parse_data_structs import ParseDataStructs

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ from sphinx.util import logging
from pprint import pformat

srctree = os.path.abspath(os.environ["srctree"])
sys.path.insert(0, os.path.join(srctree, "scripts/lib/kdoc"))
sys.path.insert(0, os.path.join(srctree, "tools/lib/python/kdoc"))

from kdoc_files import KernelFiles
from kdoc_output import RestFormat
Loading