summaryrefslogtreecommitdiff
path: root/SCons/Script
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into maint/validateOptionsWilliam Deegan2023-05-035-90/+91
|\
| * Add some cheap return and parameter annotationsMats Wichmann2023-05-015-91/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* | Minor cleanup ValidateOptions doc/code/testMats Wichmann2023-04-142-90/+133
|/ | | | | | | | | | | | Some nearby things in Main.py as well: - docstrings polished a bit, minor linting - move the list of predefined SConstruct file names into a constant defined at the top of the file, so it's a little less hidden, in the unlikely case of future changes. Manpage text and example revised a bit. Signed-off-by: Mats Wichmann <mats@linux.com>
* man: add a "New in..." to ValidateOPtions [skip appveyor]Mats Wichmann2023-03-031-3/+3
| | | | | | | The new ValidateOptions had a :versionadded: in the docstring, but just noticed the actual manpage entry didn't have similar. Signed-off-by: Mats Wichmann <mats@linux.com>
* [ci skip] Update versionadded for ValidateOptions()William Deegan2023-03-021-1/+1
|
* Fixed using --diskcheck=none from command line. It was always broken. ↵William Deegan2022-12-191-1/+4
| | | | SetOption('diskcheck','none') has been working all along. Also refactored the DiskChecker class to have more meaningful properties and not shadow default python objects (list, dir)..
* Manpage tweaking [skip appveyor]Mats Wichmann2022-12-061-11/+9
| | | | | | | | | | | | | * Reworded the section on --experimental - separate when the two current features were made available, and when --experimental itself was added. * Reworded in GetOption * Changed tags on a few options * Use entity forms in more places (Python -> &Python;, SConscript -> &SConscript; etc.) * Make changed/added notifications more consistent with what Sphinx produces for the API docs (:versionadded: and :versionchanged: markup) Signed-off-by: Mats Wichmann <mats@linux.com>
* Added --experimental=tm_v2 which switches to use Andrew Morrow's new ↵William Deegan2022-12-041-2/+2
| | | | ParallelJob implementation. WHich should scale much better for highly parallel builds
* Migrate Taskmaster tracing to use python loggingWilliam Deegan2022-10-211-12/+1
|
* move Taskmaster and Jobs to SCons.TaskmasterWilliam Deegan2022-10-121-3/+3
|
* Do not initialize DefaultEnvironment onAnatoli Babenia2022-09-152-7/+13
| | | | Exit(), GetLaunchDir() and SConscriptChdir()
* Remove unused private method SConsEnvironment._exceeds_version()Anatoli Babenia2022-09-151-5/+0
|
* doc: change five functions to appear global-onlyMats Wichmann2022-09-142-10/+10
| | | | | | | | | | | | | The five functions EnsureSConsVersion, EnsurePythonVersion, Exit, GetLaunchDir, SConscriptChdir were listed as both global and environment functions, but they do nothing in the context of an environment, so marked in the xml as "global". This only changes the presentation in the manpage & userguide appendix, not the behavior. Minor tweaks in the code around SConscriptChdir - actually use a bool True/False instead of 0/1, and added a couple of type annotations. Signed-off-by: Mats Wichmann <mats@linux.com>
* Make EnsurePythonVersion static tooAnatoli Babenia2022-09-042-2/+3
|
* Exec `EnsureSconsVersion` without init of default environmentAnatoli Babenia2022-09-042-6/+11
|
* Import functions with adding SConscript namespaceAnatoli Babenia2022-09-041-2/+1
|
* doc and docstring updatesWilliam Deegan2022-08-173-13/+11
|
* rework the docsWilliam Deegan2022-08-161-14/+27
|
* Address doc and docstring feedback from mwichmannadd_api_to_check_for_invalid_options_issue_4187William Deegan2022-08-152-7/+19
|
* Added throw_exception parameter to ValidateOptions() which allows you to ↵William Deegan2022-08-153-5/+52
| | | | select either have ValidateOptions() issue error message and exit,or throw an exception and then you can handle it your own way. per dmoody's sugguestion
* add language with instructions what to do if options added by tools are ↵William Deegan2022-08-141-3/+8
| | | | being flagged as undefined. Per mwichmann's feedback
* address comments by mwichmannWilliam Deegan2022-08-141-2/+2
|
* Add ValidateOption() API which validates that all command line options are ↵William Deegan2022-08-134-0/+33
| | | | either SCons specified or specifie by AddOption calls. It will error out if there are any unknown options. Resolves Issue #4187
* Fixed typoWilliam Deegan2022-06-141-2/+2
|
* Added option to allow scons to determine if it should skip ninja regeneration.Daniel Moody2022-06-071-1/+2
|
* SConscript doc tweaks per #4150 review comments [skip appveyor]Mats Wichmann2022-05-261-2/+3
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* A little more work on Sconscript() documentation [skip appveyor]Mats Wichmann2022-05-251-22/+21
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Try to improve variantdir docs [skip appveyor]Mats Wichmann2022-05-251-30/+26
| | | | | | | Reorder some bits, add some explantaions, include example of passing different environments to subsidiary SConscript. Signed-off-by: Mats Wichmann <mats@linux.com>
* remove scons-ninja-daemon option in favor of interactiveDaniel Moody2022-03-143-93/+77
|
* Fix issue where only the first interactive 'build' command's results were ↵William Deegan2022-02-141-1/+6
| | | | being written to the sconsign file
* fix up interactive to support ninja scons daemonDaniel Moody2022-02-113-72/+87
|
* Additional Help updatesMats Wichmann2022-02-041-60/+63
| | | | | | | Drop the previous change to join lines even if the option part overflows its gutter. Signed-off-by: Mats Wichmann <mats@linux.com>
* Tweak the scons help messageMats Wichmann2022-02-031-79/+88
| | | | | | | | | | | | | Processing changed a bit - some lines can now be joined instead of split (if the usage part is short so the combination will still fit). Dropped the "Ingored for compatibility" chunk from the printout. The usage: message was changed as it didn't mention variables. A number of tests expected the exact value of that line, and so were updated. Updated docstrings (for the API docs). Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #4067 from mwichmann/wintweaksWilliam Deegan2021-11-261-6/+5
|\ | | | | Fix tests to not hang on Windows with bad .py assoc
| * Fix tests to not hang on Windows with bad .py assocMats Wichmann2021-11-261-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For systems where the association for .py files is not to an actual Python interpreter, those few cases where we need to run a Python script directly as a program don't work. This could be because the association was never set up, or because some other program (e.g. Visual Studio Code) has taken it over. In some cases may appear to "hang" because the alternate program is waiting for user interaction runtest.py now has a mechanism to check (thanks to Brett Cannon for providing this incantation). It isn't super precise (looks for the substring "py" in the queried association), but should work out. It sets an environment variable which the test framework can read and as a result set a flag which individual tests can read. Two tests in scons-time which had previously been set to skip-if-win32 now look at this flag instead. Three tests in sconsign now also look at this flag. This allows a clean run on my dev box with VS Code having taken over the .py association. Various things can break if the environment used to fire off Windows processes doesn't contain %UserProfile%. Added this to the short list of passthrough env vars. Apparently an environment without this value is now considered invalid (it blew up the erroneously launched VS Code, but we've apparently been lucky it hasn't blown up more things - believe there was also a report of a problem with the Visual Studio setup scripts). A little extra cleanup: - a couple of Py2-isms were cleaned out (Script/Main.py and in the test framework) - The paths to look for site-scons were rewritten (part of this was another Py2-ism), and the system path changed a bit - the old path is still checked, and the manpage updated to reflect this. - runtest.py dropped the unused whereis functions. - the three sconsign tests now use f-string formatting, mostly as an experiment to see how easy it is to convert. Fixes #4053 Signed-off-by: Mats Wichmann <mats@linux.com>
* | rebase from masterWilliam Deegan2021-11-211-3/+6
|/
* Update post release changesWilliam Deegan2021-11-211-1/+1
|
* 4.3.0 updates4.3.0William Deegan2021-11-171-1/+1
|
* Change SCons.Scanner.Base to ScannerBaseMats Wichmann2021-10-041-1/+1
| | | | | | | | | | Maintenance: SCons has multiple classes named Base, which is a bit unfortunate. Some already use a context-qualified name, like BuilderBase, which seems preferable. Do that for ScannerBase, but leave the name Base in the SCons.Scanner package in case *external* users are depending on SCons.Scanner.Base working. SCons internally no longer uses that name. Signed-off-by: Mats Wichmann <mats@linux.com>
* Post 4.2.0 merge/reset to development modeWilliam Deegan2021-07-311-1/+1
|
* Allow disable_execute_ninja and disable_ninja to be set via SetOptionWilliam Deegan2021-07-211-31/+43
|
* Tweak doc of experimental option [skip travis]Mats Wichmann2021-07-131-4/+6
| | | | | | | | | | | | Twiddled the way the experimental option is described, and listed ninja as the available feature. Also reformatted the exception call in the code for unknown feature, behavior was not changed. Essentially, this is a doc-only change. Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #3959 from mwichmann/nowarn-missing-sconscriptWilliam Deegan2021-07-121-13/+19
|\ | | | | Change warnings behavior of missing SConscript
| * Change warnings behavior of missing SConscriptMats Wichmann2021-06-181-13/+19
| | | | | | | | | | | | | | If SConscript() is called with must_exist=False, accept the user's will without issuing a warning about the file being missing. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge branch 'master' into ninja-generationWilliam Deegan2021-05-246-386/+429
|\ \ | |/
| * Update the documentation for GetOptionMats Wichmann2021-05-111-285/+277
| | | | | | | | | | | | | | | | | | Since working on Get/SetOption anyway via tests, update the documentation as well. GetOption now has a table (instead of a spread out list) to match SetOption, and the available vars are all listed, as well as a note on AddOption'd vars. Signed-off-by: Mats Wichmann <mats@linux.com>
| * Enable SetOption for implicit_deps*Mats Wichmann2021-05-082-153/+159
| | | | | | | | | | | | The SetOption table in the docs is reformatted for easier editing. Signed-off-by: Mats Wichmann <mats@linux.com>
| * Make sure SetOption list is up to dateMats Wichmann2021-05-082-16/+67
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| * Fix some imports and other checker warningsMats Wichmann2021-05-054-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Removed a number of imports reported as unused. * Reorganize imports in a few places. * Checker reported warnings problems ("Instantiating an exception, but not raising it, has no effect"): serveral tool modules instantiated a warning class thinking (?) it would issue the warning; changed these to the standard use - calling the warn() function with the warnclass as an arg. * Tool modules that were touched had the copyright header munging applied. * Removed irritating "####" lines from gettext and msgfmt tools. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Add --experimental=ninjaWilliam Deegan2021-04-131-2/+2
| |