diff options
| -rw-r--r-- | .pylintrc | 2 | ||||
| -rw-r--r-- | Documentation/Makefile | 2 | ||||
| -rw-r--r-- | Documentation/sphinx/kernel_abi.py | 2 | ||||
| -rwxr-xr-x | Documentation/sphinx/kernel_include.py | 2 | ||||
| -rw-r--r-- | Documentation/sphinx/kerneldoc.py | 2 | ||||
| -rw-r--r-- | MAINTAINERS | 3 | ||||
| -rwxr-xr-x | scripts/jobserver-exec | 2 | ||||
| -rwxr-xr-x | scripts/kernel-doc.py | 2 | ||||
| -rwxr-xr-x | tools/docs/check-variable-fonts.py | 8 | ||||
| -rwxr-xr-x | tools/docs/get_abi.py | 2 | ||||
| -rw-r--r-- | tools/docs/lib/__init__.py | 0 | ||||
| -rwxr-xr-x | tools/docs/parse-headers.py | 9 | ||||
| -rwxr-xr-x | tools/docs/sphinx-build-wrapper | 7 | ||||
| -rwxr-xr-x | tools/docs/sphinx-pre-install | 5 | ||||
| -rw-r--r-- | tools/lib/python/abi/abi_parser.py (renamed from scripts/lib/abi/abi_parser.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/abi/abi_regex.py (renamed from scripts/lib/abi/abi_regex.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/abi/helpers.py (renamed from scripts/lib/abi/helpers.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/abi/system_symbols.py (renamed from scripts/lib/abi/system_symbols.py) | 0 | ||||
| -rwxr-xr-x | tools/lib/python/jobserver.py (renamed from scripts/lib/jobserver.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/enrich_formatter.py (renamed from tools/docs/lib/enrich_formatter.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_files.py (renamed from scripts/lib/kdoc/kdoc_files.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_item.py (renamed from scripts/lib/kdoc/kdoc_item.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_output.py (renamed from scripts/lib/kdoc/kdoc_output.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_parser.py (renamed from scripts/lib/kdoc/kdoc_parser.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_re.py (renamed from scripts/lib/kdoc/kdoc_re.py) | 0 | ||||
| -rwxr-xr-x | tools/lib/python/kdoc/latex_fonts.py (renamed from tools/docs/lib/latex_fonts.py) | 0 | ||||
| -rwxr-xr-x | tools/lib/python/kdoc/parse_data_structs.py (renamed from tools/docs/lib/parse_data_structs.py) | 0 | ||||
| -rw-r--r-- | tools/lib/python/kdoc/python_version.py (renamed from tools/docs/lib/python_version.py) | 0 |
28 files changed, 29 insertions, 19 deletions
diff --git a/.pylintrc b/.pylintrc index 89eaf2100eddc7..8c6fc2b628b3e9 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,2 +1,2 @@ [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"]' diff --git a/Documentation/Makefile b/Documentation/Makefile index c66df29cf0a321..fda2bef8d9d81c 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -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' diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py index 32e39fb8bc3b31..7ec832da84447f 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -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 diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py index 75e139287d5002..a12455daa6d7a9 100755 --- a/Documentation/sphinx/kernel_include.py +++ b/Documentation/sphinx/kernel_include.py @@ -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 diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py index 2586b4d4e494d7..56f382a6bdf1c4 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -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 diff --git a/MAINTAINERS b/MAINTAINERS index 8a9411e5c1e18a..efe98e680c14a4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7412,8 +7412,7 @@ P: Documentation/doc-guide/maintainer-profile.rst T: git git://git.lwn.net/linux.git docs-next F: Documentation/ F: scripts/kernel-doc* -F: scripts/lib/abi/* -F: scripts/lib/kdoc/* +F: tools/lib/python/* F: tools/docs/ F: tools/net/ynl/pyynl/lib/doc_generator.py X: Documentation/ABI/ diff --git a/scripts/jobserver-exec b/scripts/jobserver-exec index ae23afd344ec66..758e947a6fb906 100755 --- a/scripts/jobserver-exec +++ b/scripts/jobserver-exec @@ -13,7 +13,7 @@ See: import os import sys -LIB_DIR = "lib" +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)) diff --git a/scripts/kernel-doc.py b/scripts/kernel-doc.py index d9fe2bcbd39cc1..bb24bbf7316765 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/kdoc" SRC_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR)) diff --git a/tools/docs/check-variable-fonts.py b/tools/docs/check-variable-fonts.py index c0997d6861dc20..c48bb05dad82f7 100755 --- a/tools/docs/check-variable-fonts.py +++ b/tools/docs/check-variable-fonts.py @@ -9,13 +9,17 @@ """ Detect problematic Noto CJK variable fonts. -or more details, see lib/latex_fonts.py. +or more details, see .../tools/lib/python/kdoc/latex_fonts.py. """ import argparse import sys +import os.path -from lib.latex_fonts import LatexFontChecker +src_dir = os.path.dirname(os.path.realpath(__file__)) +sys.path.insert(0, os.path.join(src_dir, '../lib/python/kdoc')) + +from latex_fonts import LatexFontChecker checker = LatexFontChecker() diff --git a/tools/docs/get_abi.py b/tools/docs/get_abi.py index da69e77559cc36..e0abfe12fac7de 100755 --- a/tools/docs/get_abi.py +++ b/tools/docs/get_abi.py @@ -14,7 +14,7 @@ import sys # Import Python modules -LIB_DIR = "../../scripts/lib/abi" +LIB_DIR = "../lib/python/abi" SRC_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR)) diff --git a/tools/docs/lib/__init__.py b/tools/docs/lib/__init__.py deleted file mode 100644 index e69de29bb2d1d6..00000000000000 --- a/tools/docs/lib/__init__.py +++ /dev/null diff --git a/tools/docs/parse-headers.py b/tools/docs/parse-headers.py index 6716c73002584e..ed9cf2bf22de93 100755 --- a/tools/docs/parse-headers.py +++ b/tools/docs/parse-headers.py @@ -24,10 +24,13 @@ The optional ``FILE_RULES`` contains a set of rules like: replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` """ -import argparse +import argparse, sys +import os.path -from lib.parse_data_structs import ParseDataStructs -from lib.enrich_formatter import EnrichFormatter +src_dir = os.path.dirname(os.path.realpath(__file__)) +sys.path.insert(0, os.path.join(src_dir, '../lib/python/kdoc')) +from parse_data_structs import ParseDataStructs +from enrich_formatter import EnrichFormatter def main(): """Main function""" diff --git a/tools/docs/sphinx-build-wrapper b/tools/docs/sphinx-build-wrapper index 1efaca3d16aa90..ce0b1b5292da0d 100755 --- a/tools/docs/sphinx-build-wrapper +++ b/tools/docs/sphinx-build-wrapper @@ -56,14 +56,15 @@ import sys from concurrent import futures from glob import glob -from lib.python_version import PythonVersion -from lib.latex_fonts import LatexFontChecker -LIB_DIR = "../../scripts/lib" +LIB_DIR = "../lib/python" SRC_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR)) +sys.path.insert(0, os.path.join(SRC_DIR, LIB_DIR + '/kdoc')) # temporary +from python_version import PythonVersion +from latex_fonts import LatexFontChecker from jobserver import JobserverExec # pylint: disable=C0413,C0411,E0401 # diff --git a/tools/docs/sphinx-pre-install b/tools/docs/sphinx-pre-install index 647e1f60357f1e..d8c9fb76948d3b 100755 --- a/tools/docs/sphinx-pre-install +++ b/tools/docs/sphinx-pre-install @@ -32,8 +32,11 @@ import re import subprocess import sys from glob import glob +import os.path -from lib.python_version import PythonVersion +src_dir = os.path.dirname(os.path.realpath(__file__)) +sys.path.insert(0, os.path.join(src_dir, '../lib/python/kdoc')) +from python_version import PythonVersion RECOMMENDED_VERSION = PythonVersion("3.4.3").version MIN_PYTHON_VERSION = PythonVersion("3.7").version diff --git a/scripts/lib/abi/abi_parser.py b/tools/lib/python/abi/abi_parser.py index 66a738013ce133..66a738013ce133 100644 --- a/scripts/lib/abi/abi_parser.py +++ b/tools/lib/python/abi/abi_parser.py diff --git a/scripts/lib/abi/abi_regex.py b/tools/lib/python/abi/abi_regex.py index 8a57846cbc69c3..8a57846cbc69c3 100644 --- a/scripts/lib/abi/abi_regex.py +++ b/tools/lib/python/abi/abi_regex.py diff --git a/scripts/lib/abi/helpers.py b/tools/lib/python/abi/helpers.py index 639b23e4ca33cc..639b23e4ca33cc 100644 --- a/scripts/lib/abi/helpers.py +++ b/tools/lib/python/abi/helpers.py diff --git a/scripts/lib/abi/system_symbols.py b/tools/lib/python/abi/system_symbols.py index f15c94a6e33ced..f15c94a6e33ced 100644 --- a/scripts/lib/abi/system_symbols.py +++ b/tools/lib/python/abi/system_symbols.py diff --git a/scripts/lib/jobserver.py b/tools/lib/python/jobserver.py index a24f30ef4fa869..a24f30ef4fa869 100755 --- a/scripts/lib/jobserver.py +++ b/tools/lib/python/jobserver.py diff --git a/tools/docs/lib/enrich_formatter.py b/tools/lib/python/kdoc/enrich_formatter.py index bb171567a4ca10..bb171567a4ca10 100644 --- a/tools/docs/lib/enrich_formatter.py +++ b/tools/lib/python/kdoc/enrich_formatter.py diff --git a/scripts/lib/kdoc/kdoc_files.py b/tools/lib/python/kdoc/kdoc_files.py index 1fd8d17edb3216..1fd8d17edb3216 100644 --- a/scripts/lib/kdoc/kdoc_files.py +++ b/tools/lib/python/kdoc/kdoc_files.py diff --git a/scripts/lib/kdoc/kdoc_item.py b/tools/lib/python/kdoc/kdoc_item.py index 19805301cb2cf8..19805301cb2cf8 100644 --- a/scripts/lib/kdoc/kdoc_item.py +++ b/tools/lib/python/kdoc/kdoc_item.py diff --git a/scripts/lib/kdoc/kdoc_output.py b/tools/lib/python/kdoc/kdoc_output.py index 58f115059e935c..58f115059e935c 100644 --- a/scripts/lib/kdoc/kdoc_output.py +++ b/tools/lib/python/kdoc/kdoc_output.py diff --git a/scripts/lib/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py index f7dbb086836736..f7dbb086836736 100644 --- a/scripts/lib/kdoc/kdoc_parser.py +++ b/tools/lib/python/kdoc/kdoc_parser.py diff --git a/scripts/lib/kdoc/kdoc_re.py b/tools/lib/python/kdoc/kdoc_re.py index 612223e1e7238e..612223e1e7238e 100644 --- a/scripts/lib/kdoc/kdoc_re.py +++ b/tools/lib/python/kdoc/kdoc_re.py diff --git a/tools/docs/lib/latex_fonts.py b/tools/lib/python/kdoc/latex_fonts.py index 29317f8006ea2f..29317f8006ea2f 100755 --- a/tools/docs/lib/latex_fonts.py +++ b/tools/lib/python/kdoc/latex_fonts.py diff --git a/tools/docs/lib/parse_data_structs.py b/tools/lib/python/kdoc/parse_data_structs.py index 25361996cd20f0..25361996cd20f0 100755 --- a/tools/docs/lib/parse_data_structs.py +++ b/tools/lib/python/kdoc/parse_data_structs.py diff --git a/tools/docs/lib/python_version.py b/tools/lib/python/kdoc/python_version.py index 4fde1b88216447..4fde1b88216447 100644 --- a/tools/docs/lib/python_version.py +++ b/tools/lib/python/kdoc/python_version.py |
