From 06e8b9917b8144f1c62687333aa0aaf2b546b42a Mon Sep 17 00:00:00 2001 From: neofelis2X Date: Wed, 22 Jan 2025 20:43:50 +0100 Subject: [PATCH] Docs: write sphinx warnings to log file in html directory --- build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 8b0a3a26..34b3ea01 100755 --- a/build.py +++ b/build.py @@ -1156,7 +1156,10 @@ def cmd_sphinx(options, args): pwd2 = pushDir(sphinxDir) buildDir = os.path.join(sphinxDir, 'build') htmlDir = os.path.join(phoenixDir(), 'docs', 'html') - runcmd('{} -m sphinx -b html -d {}/doctrees . {}'.format(PYTHON, buildDir, htmlDir)) + sphinx_log = os.path.join(htmlDir, 'warnings', 'sphinx_warnings.log') + + runcmd('{} -m sphinx --builder html --color --warning-file {} \ + --doctree-dir {}/doctrees . {}'.format(PYTHON, sphinx_log, buildDir, htmlDir)) del pwd2 msg('Postprocessing sphinx output...')