summaryrefslogtreecommitdiffstats
path: root/SCons
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'master' into AddOption-option-objWilliam Deegan2024-09-168-157/+427
|\
| * Merge branch 'master' into issue/TEMPFILE-fiddleWilliam Deegan2024-09-165-111/+337
| |\
| | * Update some doc for OverrideEnvironmentMats Wichmann2024-09-141-6/+6
| | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | * Merge branch 'master' into env/override-delWilliam Deegan2024-09-113-69/+105
| | |\
| | * | Don't let deletions leak from OverrideEnvironmentMats Wichmann2024-09-045-111/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, deleting from an OverrideEnvironment removed not just the override item but also the same item in the subject (base) environment. This prevents supplying the value from the subject, as that would be contrary to the expectation after "I deleted this variable". However, this lets the override modify its subject, a form of leakage we don't want. Now a deleted item has its key recorded to prevent refilling later. Direct assignment will still set the item back in the override. rpm packaging tool: call Override factory method rather than directly instantiating OverrideEnvironment ("best practices") Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | Update docs and usage of TEMPFILE/TempFileMungeMats Wichmann2024-09-143-46/+90
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tempfiles are now cleaned up via registering a cleanups with atexit(), instead of trying to squeeze removing the file into the command line. On Windows that caused the file to get deleted too early (did not work well with interactive mode), and on Linux it didn't remove the file at all. The Platform test expected to be able to read the tempfilename as the last argument of the "command", but this is no longer provided as the "rm filename" is no longer added, so now it has to chop off the prefix from the command-file argument to get the filename. Unrelatedly, two syntax warnings that turn up in the test output where some TeX syntax was listed in a docstring in a test are fixed by making that a raw string - got tired of seeing these. Fixes #4595 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | Fix some AddOption issuesMats Wichmann2024-09-112-19/+37
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The optparse add_option method supports an additional calling style that is not directly described in SCons docs, but is included by reference ("see the optparse documentation for details"): it takes a single arg consisting of a premade option object. Because the optparse code detects that case based on seeing zero kwargs, and we always add at least one (default=) that would fail for AddOption. Fix for consistency, but don't advertise it further: not addewd to manpage synoposis/description. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge branch 'master' into maint/PkgVariableWilliam Deegan2024-09-111-47/+73
|\ \
| * | Tweak SConsOptions docstringsMats Wichmann2024-09-061-47/+73
| |/ | | | | | | | | | | | | | | | | | | | | | | Indicate more clearly (for the API docs) that something is an SCons addition/modification, since that doc shows members inherited from the optparse class - this was always easier to tell in the code than in the doc. A few other minor rearrangements and comments and a few type annotations. Does not change any behavior. Signed-off-by: Mats Wichmann <mats@linux.com>
* | PackageVariable now returns the default on "true"Mats Wichmann2024-09-042-22/+32
|/ | | | | | | | | | | | | | In all doc versions until 4.8.0, PackageVariable had wording like: "The option will support the values yes, true, on, enable or search, in which case the specified default will be used", but the code didn't actually do that, it just returned True. With this change it now returns the default value, with a slight tweak - if the default is one of the spelled out enabling strigs, it returns the boolean True instead. The indication that the default is produced if a truthy string is given is restored to the manpage (it was never dropped from the User Guide). Signed-off-by: Mats Wichmann <mats@linux.com>
* Updates for 4.8.1 release4.8.1William Deegan2024-09-041-4/+4
|
* Merge pull request #4584 from siegria/fix_piped_spawn_encodingWilliam Deegan2024-09-031-2/+2
|\ | | | | [Platform win32] Fix crash when pipe encoding is set to None
| * Changed default encoding for pspawned processes on win32 to now be oem. ↵William Deegan2024-09-021-10/+2
| | | | | | | | Updated CHANGES/RELEASE
| * Added \r\n -> \n per jcbrill feedback in PRWilliam Deegan2024-08-161-2/+2
| |
| * Switched to 'oem' encoding per jcbrill's adviceWilliam Deegan2024-08-161-2/+4
| |
| * Updates and slight refactor in fixWilliam Deegan2024-08-161-2/+8
| |
| * Apply 'utf-8' encoding if encoding is set to Nonesiegria2024-08-081-2/+2
| | | | | | As None is not a valid encoding value, fallback to 'utf-8'. This case happen if stdout or stderr is of type io.stringIO.
* | Merge branch 'master' into issue/unique-delete-existingWilliam Deegan2024-08-299-22/+121
|\ \
| * | Variables testing: confirm space-containing valuesMats Wichmann2024-08-272-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit introduced a change to how the framework handled arguments, which necessitated some changes in the variables code. It got too complicated, too many places would need too much logic. Just accept that the test.run(arguments="...") will never be quite like the same arguments on the CLI, and just use lists to avoid things being broken on embedded spaces - those won't be split. Many tests arleady do this, so it's nothing new. Added a comment in TestCmd to make it more clear. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | Fix ListVariable with a space-containing valueMats Wichmann2024-08-168-21/+106
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ListVariable handling of a quoted variable value containing spaces. As a side effect of splitting the former monolithic converter/validator for ListVariable into separate callbacks, it became possible for subst to be called twice. The ListVariable converter produces an instance of a _ListVariable container, and running subst on that result ends up losing information, so avoid doing so. While developing a test for this, it turned out the test framework also didn't handle a quoted argument containing a space, so that a test case passing arguments to scons via "run(arguments='...')" could end up with scons seeing a different (broken) command line than scons invoked with the same arguments typing to a shell prompt. A regex is now used to more accurately split the "arguments" parameter, and a unit test was added to the framework tests to validate. The framework fix had a side effect - it was possible that when run as part of the test suite, the Variables package could receive a value still wrapped in quotes, leading to string mismatches ('"with space"' is not equal to 'with space'), so ListVariable now strips wrapping quote marks. Also during testing it turned out that the earlier fix for #4241, allowing a Variable to declare the value should not be subst'd, introduced problems for two types which assumed they would always be passed a string. With subst=False, they could be passed a default value that had been specified as a bool. Fixed to not fail on that. Fixes #4585 Signed-off-by: Mats Wichmann <mats@linux.com>
* | Fix bug with unique adds and delete_existingMats Wichmann2024-08-192-52/+83
|/ | | | | | | | | | | | AppendUnique and PrependUnique, when called with delete_existing true, had a small logic flaw: it might remove an existing value if the value to be added is a scalar (string, most likely) and there was a substring match. The code needs to do an equality test, not a membership test. Unit tests updated and got some reformatting, plus dropped a duplicate definition of reserved_variables. Signed-off-by: Mats Wichmann <mats@linux.com>
* added release.txt blurb. Fixed spelling typo in Defaults.xmlWilliam Deegan2024-08-061-1/+1
|
* Doc: use consistent repeated-args syntax [skip appveyor]Mats Wichmann2024-08-033-42/+58
| | | | | | | | | For now, want to keep the "key=value, ..." form for Functions/Method signatures instead of using **kwargs, since that terminology hasn't been introduced. May switch signatures later, but if so, do them all, let's not be piecemeal. Signed-off-by: Mats Wichmann <mats@linux.com>
* Added test to check that 'from SCons.Variables import *' will import all ↵William Deegan2024-07-241-0/+22
| | | | types of SCons defined Variables
* Restore usage of "from SCons.Variables import *`Mats Wichmann2024-07-171-0/+5
| | | | | | | | | | | This (unadvertised) import turns out to have real-world usage, and there's no real reason to prohibit it, although we do suggest using `from SCons.Script import *` as a more complete version. SCons 4.8.0 introduced an `__all__` in the variables module; add the five variables types to this so the listed import will work as expected. Signed-off-by: Mats Wichmann <mats@linux.com>
* Enhancement: Dump() takes multiple args nowMats Wichmann2024-07-123-45/+92
| | | | | | | | | | | | | | | env.Dump previously either printed the whole dict of construction variables (with no args), or a single value (with one variable name argument). Now it takes a varargs specifier so you can give any number of consvar names. All returned strings are now in dict form, including the single-arg case which previously just returned the value matching the key, not a dict with a key:value pair. This is a slight ABI change, but should not affect any actual scripts since the output is intended for human consumption, not for programmatic use - env.Dictionary() can be used to fetch construction vars for programmatic use (in fact, Dump is a consumer of Dictionary's output). Signed-off-by: Mats Wichmann <mats@linux.com>
* Implement somewhat pythonic type hints in sctypesThaddeus Crews2024-07-091-6/+32
|
* Return master to development mode post releaseWilliam Deegan2024-07-081-1/+1
|
* 4.8.0 updates4.8.0William Deegan2024-07-071-4/+4
|
* Updates for SCons 4.8.0 releaseWilliam Deegan2024-07-071-1/+1
|
* Bump SCons "added" version to 4.8 [skip appveyor]Mats Wichmann2024-07-072-1/+5
| | | | | | | | Two additions in the cycle since 4.7.0 had documentation annotations that they were added in 4.7.1. Update to 4.8.0. One of those changes didn't have an annotation in the code. Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #4567 from Repiteo/scsub-pdbWilliam Deegan2024-07-061-0/+4
|\ | | | | Add `SCsub` to known SConscript names
| * Add `SCsub` to known SConscript namesThaddeus Crews2024-07-051-0/+4
| |
* | Additinal tweaks for $VSWHERE [skip appveyor]Mats Wichmann2024-07-031-14/+15
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | Further tweak $VSWHERE, also $MSVC_VERSION [skip appveyor]Mats Wichmann2024-07-031-31/+39
| | | | | | | | | | | | Apply the same note to $MSVC_VERSION about discovery, for consistency. Signed-off-by: Mats Wichmann <mats@linux.com>
* | vswhere: remove mention of legacy option [skip appveyor]Mats Wichmann2024-07-021-6/+3
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | Update $VSWHERE description. [skip appveyor]Mats Wichmann2024-07-011-33/+48
|/ | | | | | | | Requested wordsmithing on the VSWHERE construction variable. Per request, dropped msvc.py from the github/win32 skip list. Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #4534 from jcbrill/jbrill-msvc-detectWilliam Deegan2024-07-0117-664/+2909
|\ | | | | MSVC: detection fixes
| * Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-06-29120-499/+622
| |\ | | | | | | | | | | | | # Manually resolved conflicts: # RELEASE.txt
| * \ Merge branch 'master' into jbrill-msvc-detectWilliam Deegan2024-06-0710-91/+186
| |\ \
| * | | Fix bug in Config.py initialization and rework support for ↵Joseph Brill2024-05-285-32/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MsvcQueryVersionToolsetTests. Changes: * module-level initialization index was not renamed from vc_version to msvc_version. * Add function to return toolset sxs map and versions list in ScriptArguments.py * Add additional fields to extended version components * Add data structure for installed vcs versions/toolsets for testing * Update vcTests.py to new data structure.
| * | | Fix msvc_query_version_toolset function test in vcTests.pyJoseph Brill2024-05-282-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | Changes: * Add function to return msvc version and toolset version pairs for all installed vcs. * Construct set of installed toolset vcs for determining if msvc_query_version_toolset should raise an exception.
| * | | Rework experimental msvc_query_version_toolset function.Joseph Brill2024-05-274-92/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: * Add context manager functions to temporary change the policy for msvc not found and msvc script errors within a context block. * Change msvc_query_version_toolset function behavior: raise exceptions if not found and for argument validation errors; otherwise return msvc version and toolset version. * Additional logging of exception messages . * Update tests for 14.3X/14.4X toolsets for VS 2022.
| * | | Fix issue #4543: Add support for msvc toolset versions 14.4x for msvc ↵Joseph Brill2024-05-276-160/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buildtools v143. Changes: * Add msvc build series data structure. * Change msvc build tools data structure to contain list of build series. * Update script argument validation and tests.
| * | | Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-05-263-73/+86
| |\ \ \
| * \ \ \ Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-05-212-161/+201
| |\ \ \ \
| * | | | | Simplify check for VSWHERE undefined, None, or empty.Joseph Brill2024-05-211-3/+3
| | | | | |
| * | | | | Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-05-206-95/+143
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually resolve conflicts: * RELEASE.txt
| * \ \ \ \ \ Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-05-182-105/+97
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'master' into jbrill-msvc-detectJoseph Brill2024-05-1426-294/+309
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually resolved conflicts: * CHANGES.txt * RELEASE.txt * test/MSVS/vs-14.3-exec.py