diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-08-12 17:52:31 +0200 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2025-08-13 10:19:16 -0600 |
| commit | 637fa6b38113fddca7da2f0507f709f46a44047a (patch) | |
| tree | bed892acbfb10cd3465bfaba1a227ad8e321204f /scripts/sphinx-pre-install.py | |
| parent | 8f6f54c464d7fccfb8da46ca0afcb0860e6d73bb (diff) | |
scripts: sphinx-pre-install: output Python and docutils version
Specially when debugging issues, knowing the versions is
important. Add it to the script output.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/96142ec916b9064c859b200639c3595115080322.1754992972.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/sphinx-pre-install.py')
| -rwxr-xr-x | scripts/sphinx-pre-install.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py index 42f55e67256d..de5bcfd052b5 100755 --- a/scripts/sphinx-pre-install.py +++ b/scripts/sphinx-pre-install.py @@ -154,6 +154,20 @@ class SphinxDependencyChecker: cur_ver = sys.version_info[:3] if cur_ver >= MIN_PYTHON_VERSION: + ver = ver_str(cur_ver) + print(f"Python version: {ver}") + + # This could be useful for debugging purposes + if SphinxDependencyChecker.which("docutils"): + result = SphinxDependencyChecker.run(["docutils", "--version"], + capture_output=True, text=True) + ver = result.stdout.strip() + match = re.search(r"(\d+\.\d+\.\d+)", ver) + if match: + ver = match.group(1) + + print(f"Docutils version: {ver}") + return python_ver = ver_str(cur_ver) |
