Skip to content

Fix short-option processing #4598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

mwichmann
Copy link
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 <[email protected]>
@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
6 of 8 checks passed
@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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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
Status: Complete
Development

Successfully merging this pull request may close these issues.

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