summaryrefslogtreecommitdiffstats
path: root/SCons/Script/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into feature/local-helpWilliam Deegan2023-08-241-2/+2
|\
| * Change the default to error on missing SConscriptMats Wichmann2023-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | This completes a change begun in 3.0.2, when the behavior changed from "skip silently" to "skip but issue a warning"; that behavior was marked deprecated in 3.1. Use must_exist=False to get the old "skip silently" behavior. Fixes #3958 Signed-off-by: Mats Wichmann <mats@linux.com>
* | Add ability to save "local" help onlyMats Wichmann2023-08-011-13/+18
|/ | | | | | | | | | | | | An additional keyword argument, "local_only", is now recorgnized by Help(). If true, and "append" is True, then only project-defined help messages are saved into the help text. That is, save help added by calls to AddOption, but not SCons' own help, which is added a different way. Fixes #2356 Fixes #3686 Signed-off-by: Mats Wichmann <mats@linux.com>
* Added test for --debug=json. Implemented DebugOptions(json). Create ↵William Deegan2023-06-051-0/+1
| | | | containing directory, and issue UserError if the directory is not creatable..
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-8/+8
| | | | | | | | | | | | | | | | | 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>
* Do not initialize DefaultEnvironment onAnatoli Babenia2022-09-151-4/+7
| | | | Exit(), GetLaunchDir() and SConscriptChdir()
* Make EnsurePythonVersion static tooAnatoli Babenia2022-09-041-1/+1
|
* Exec `EnsureSconsVersion` without init of default environmentAnatoli Babenia2022-09-041-3/+6
|
* Import functions with adding SConscript namespaceAnatoli Babenia2022-09-041-2/+1
|
* Add ValidateOption() API which validates that all command line options are ↵William Deegan2022-08-131-0/+1
| | | | either SCons specified or specifie by AddOption calls. It will error out if there are any unknown options. Resolves Issue #4187
* 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>
* Fix some imports and other checker warningsMats Wichmann2021-05-051-1/+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>
* Drop some more Py2 compat thingsMats Wichmann2020-10-131-5/+1
| | | | | | | | | | | | | Change exception type in a a couple of try block to what could go wrong, Py3 would not raise UniCodeDecodeError for these cases One try-import of StringIO module sconsign does not need a decode that was claimed as compat hack Remove some sys.version_info checks Use more modern way to get Python details in test frawmework AddMethod updated and RenameFunction dropped - it had become a one-liner and had no clients other than AddMethod (never exposed as public) Signed-off-by: Mats Wichmann <mats@linux.com>
* Update some copyright strings and drop __revision__ [skip appveyor]Mats Wichmann2020-09-231-18/+16
| | | | | | | | | | | | | | | | | | Touches the first and second levels of SCons (except SCons.Tool), not tests or docs which remain TODO. Make sure docstring is first non-comment content, eliminate cases where docstring is set elsewhere but assigns to __doc__ - this approach of course worked inside Python, but confuses various tools. Some module-level docstrings modified a bit, in particular the convention of having the name of the module as the first line is dropped, replaced by a summary description going there instead - this improves the look in the API Docs, which otherwise display something like: SCons.Foo - SCons.Foo Signed-off-by: Mats Wichmann <mats@linux.com>
* Change Warning to SConsWarningMats Wichmann2020-07-071-1/+1
| | | | | | avoid potential overlap with Python's own Warnng class. Signed-off-by: Mats Wichmann <mats@linux.com>
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-0/+430
with current python packaging practices