Skip to content

Fix short-option processing#4598

Merged
bdbaddog merged 2 commits intoSCons:masterfrom
mwichmann:AddOption-shortopts
Oct 1, 2024
Merged

Fix short-option processing#4598
bdbaddog merged 2 commits intoSCons:masterfrom
mwichmann:AddOption-shortopts

Conversation

@mwichmann
Copy link
Copy Markdown
Collaborator

@mwichmann mwichmann commented Sep 16, 2024

Provide an override the _process_short_opts method from optparse so it behaves better. This fix is lifted directly from #3799 (other parts of that PR will be picked later).

Fixes #3798

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt (and read the README.rst)
  • I have updated the appropriate documentation

Override the _process_short_opts method from optparse so it behaves
better.  This fix is lifted directly from SCons#3799, leaving an additional
part to apply later.

Fixes SCons#3798

Signed-off-by: Mats Wichmann <mats@linux.com>
@mwichmann mwichmann added the args_and_options options processing, arguments, get/setoption and their relationshiop label Sep 16, 2024
@bdbaddog bdbaddog merged commit fc36781 into SCons:master Oct 1, 2024
@mwichmann mwichmann added this to the NextRelease milestone Oct 1, 2024
@mwichmann mwichmann deleted the AddOption-shortopts branch October 1, 2024 22:46
mwichmann added a commit to mwichmann/scons that referenced this pull request Apr 17, 2025
Adds SCons.Script._Remove_Target and SCons.Script._Remove_Argument to
allow taking away values placed the public attributes BUILD_TARGETS,
COMMAND_LINE_TARGETS, ARGUMENTS and ARGLIST. Part two of three harvesting
from old PR SCons#3799 (the short-option piece was merged as part of SCons#4598).
Intended customer will be the Options logic,

Unit tests created, also for existing SCons.Script._Add_Targets and
SCons.Script._Add_Arguments.

Signed-off-by: Mats Wichmann <mats@linux.com>
mwichmann added a commit to mwichmann/scons that referenced this pull request Apr 17, 2025
Adds SCons.Script._Remove_Target and SCons.Script._Remove_Argument to
allow taking away values placed the public attributes BUILD_TARGETS,
COMMAND_LINE_TARGETS, ARGUMENTS and ARGLIST. Part two of three harvesting
from old PR SCons#3799 (the short-option piece was merged as part of SCons#4598).
Intended customer will be the Options logic,

Unit tests created, also for existing SCons.Script._Add_Targets and
SCons.Script._Add_Arguments.

Signed-off-by: Mats Wichmann <mats@linux.com>
mwichmann added a commit to mwichmann/scons that referenced this pull request May 11, 2025
Adds SCons.Script._Remove_Target and SCons.Script._Remove_Argument to
allow taking away values placed the public attributes BUILD_TARGETS,
COMMAND_LINE_TARGETS, ARGUMENTS and ARGLIST. Part two of three harvesting
from old PR SCons#3799 (the short-option piece was merged as part of SCons#4598).
Intended customer will be the Options logic,

Unit tests created, also for existing SCons.Script._Add_Targets and
SCons.Script._Add_Arguments.

Signed-off-by: Mats Wichmann <mats@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

args_and_options options processing, arguments, get/setoption and their relationshiop

Projects

No open projects
Status: Complete

Development

Successfully merging this pull request may close these issues.

AddOption(shortOption ...) does not fully add the short option

2 participants