From 7e831fead9818b86bf974deaebd8e7b35fcce52f Mon Sep 17 00:00:00 2001 From: Roshan Ramani Date: Mon, 12 Oct 2026 15:39:06 +0530 Subject: [PATCH 1/2] Fix four documentation examples that were not valid Python A stray parenthesis in the Command() example, an unterminated string in the MSVC_VERSION example, a missing comma that joined the two X_RPM_EXTRADEFS strings into one, and a Progress() callable in the user guide missing a colon and a global declaration. Assisted-by: Claude Opus 5.5 Signed-off-by: Roshan Ramani --- CHANGES.txt | 5 +++++ SCons/Environment.xml | 2 +- SCons/Tool/msvc.xml | 2 +- SCons/Tool/packaging/packaging.xml | 2 +- doc/user/output.xml | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7f9dafe29c..8305473cfb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Fix the second Value() example in the manpage, which never ran its builder: it wrapped the Value Nodes in another Value() and nothing depended on the target. Fixes #4499. + - Fix four documentation examples that were not valid Python: a stray + parenthesis in the Command() example, an unterminated string in the + MSVC_VERSION example, a missing comma that joined the two + X_RPM_EXTRADEFS strings into one, and the user guide's Progress() + callable, which lacked a colon and a "global count". From Mats Wichmann: - Add more unit tests for UNC path handling. These tests expose some diff --git a/SCons/Environment.xml b/SCons/Environment.xml index fb16f7e35c..ddb0d5a042 100644 --- a/SCons/Environment.xml +++ b/SCons/Environment.xml @@ -1274,7 +1274,7 @@ Examples: env.Command('ddd.list', Dir('ddd'), 'ls -l $SOURCE > $TARGET') env['DISTDIR'] = 'destination/directory' -env.Command(env.Dir('$DISTDIR')), None, make_distdir) +env.Command(env.Dir('$DISTDIR'), None, make_distdir) diff --git a/SCons/Tool/msvc.xml b/SCons/Tool/msvc.xml index 64920db3e9..1821237ee6 100644 --- a/SCons/Tool/msvc.xml +++ b/SCons/Tool/msvc.xml @@ -419,7 +419,7 @@ env = Environment(MSVC_VERSION='14.2') # Initialization deferred with empty tools, triggered manually env = Environment(tools=[]) -env['MSVC_VERSION'] = '14.2 +env['MSVC_VERSION'] = '14.2' env.Tool('msvc') env.Tool('mslink') env.Tool('msvs') diff --git a/SCons/Tool/packaging/packaging.xml b/SCons/Tool/packaging/packaging.xml index 08163dc1c4..056f5cb02c 100644 --- a/SCons/Tool/packaging/packaging.xml +++ b/SCons/Tool/packaging/packaging.xml @@ -566,7 +566,7 @@ env.Package( NAME="foo", ... X_RPM_EXTRADEFS=[ - "%define _unpackaged_files_terminate_build 0" + "%define _unpackaged_files_terminate_build 0", "%define _missing_doc_files_terminate_build 0" ], ... diff --git a/doc/user/output.xml b/doc/user/output.xml index 960141589c..90820af8b7 100644 --- a/doc/user/output.xml +++ b/doc/user/output.xml @@ -552,7 +552,8 @@ Program('f2.c') screen = open('/dev/tty', 'w') count = 0 -def progress_function(node) +def progress_function(node): + global count count += 1 screen.write('Node %4d: %s\r' % (count, node)) From 9c4dacc8bc6015545e5fbced816c30539b151318 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 13 Oct 2026 20:39:24 -0700 Subject: [PATCH 2/2] [ci skip] added RELEASE.txt blurb --- RELEASE.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE.txt b/RELEASE.txt index 1274428c47..b03d5d42c6 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -91,7 +91,7 @@ DOCUMENTATION - Fixed the second Value() example in the manpage, which did not work. -* Added scons-ai.md, a condensed version of the manpage intended for +- Added scons-ai.md, a condensed version of the manpage intended for consumption by AI tools, built into build/doc/MD. It keeps every documented option, tool, builder, function and construction variable together with its description, but omits markup, cross-references, examples and version-history @@ -99,6 +99,12 @@ DOCUMENTATION generated from the checked-in documentation sources by bin/scons-man-to-ai.py, and can be built with the "ai-manpage" target. +- Fix four documentation examples that were not valid Python: a stray + parenthesis in the Command() example, an unterminated string in the + MSVC_VERSION example, a missing comma that joined the two + X_RPM_EXTRADEFS strings into one, and the user guide's Progress() + callable, which lacked a colon and a "global count". + DEVELOPMENT -----------