summaryrefslogtreecommitdiffstats
path: root/SCons/Script/Main.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4642 from Repiteo/remove-python-3.6William Deegan2024-11-161-7/+1
|\ | | | | Remove Python 3.6 support
| * Remove Python 3.6 supportThaddeus Crews2024-11-161-7/+1
| |
* | Integrate `from __future__ import annotations`Thaddeus Crews2024-11-161-5/+6
|/
* Fix some AddOption issuesMats Wichmann2024-09-111-12/+24
| | | | | | | | | | | | | 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>
* Return master to development mode post releaseWilliam Deegan2024-07-081-1/+1
|
* Updates for SCons 4.8.0 releaseWilliam Deegan2024-07-071-1/+1
|
* Bump SCons "added" version to 4.8 [skip appveyor]Mats Wichmann2024-07-071-0/+4
| | | | | | | | 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>
* Add `SCsub` to known SConscript namesThaddeus Crews2024-07-051-0/+4
|
* AddOption now recognizes "settable" optionMats Wichmann2024-06-171-11/+32
| | | | | | | | | | | | | | | | AddOption and the internal add_local_option which AddOption calls now recognize a "settable" keyword argument to indicate a project-added option can also be modified using SetOption. There was a TODO in SCons/Script/SConsOptions.py about removing three hardcoded ninja options in the "settable" list once this change was made. When that was done it turned out one test failed, because it called the SetOption before the ninja tool was initialized. Logic reordered in the test, but this is a thing to watch out for. Closes #3983. Signed-off-by: Mats Wichmann <mats@linux.com>
* Deprecate Python 3.6 support.Mats Wichmann2024-05-041-5/+7
| | | | | | | No claim is made about when it will actually be dropped, but some notice seems polite. Signed-off-by: Mats Wichmann <mats@linux.com>
* Disallow python without threading support on startupAndrew Morrow2024-01-261-0/+7
|
* adding info to the man page, changed debug keyStenGruener2023-10-281-1/+1
|
* adding unit test, --debug flag, comments in changes.txtStenGruener2023-10-281-0/+2
|
* Merge branch 'master' into feature/local-helpWilliam Deegan2023-08-241-3/+3
|\
| * "Modernize" to Python 3.6 via toolMats Wichmann2023-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ pyupgrade --py36-plus $(<filelist) Here's mostly what it's done: - No more 'stringliteral'.encode('utf-8'): now b'stringliteral' - No more unicode literals - the default open mode is 'r', leaves out if default - some f-string conversions (if shorter) - catch OSError instead of subclasses - no more mention of "object" - generator expression instead of list comp. when safe - a few tests had a shebang but actually began with blank line - remove coding: utf-8 comment, per pep 3120 this is the default now Manually - if a file in test/ was modified, then did the copyright header conversion. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Add ability to save "local" help onlyMats Wichmann2023-08-011-4/+5
|/ | | | | | | | | | | | | 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>
* Adjust help message about -HMats Wichmann2023-06-271-1/+1
| | | | | | | | | | | As noted in issue #2356 (which this change does not complete/close), the final line of help if the help message has been modified is 'Use scons -H for help about command-line options.'. This fails to mention that -H prints only those options that are defined in SCons itself, not options added via AddOption. Adjust the message to better indicate this. Signed-off-by: Mats Wichmann <mats@linux.com>
* refeactor module variables to be lower case per mwichmann's reviewWilliam Deegan2023-06-091-17/+17
|
* Address mwichmann's comments on PR. pep8 naming, abstract base class Stats, ↵William Deegan2023-06-081-8/+10
| | | | quiet some linting warnings where the use is intentional
* Skip checking for exception when writing to unwritable dir in test. Change ↵William Deegan2023-06-061-1/+3
| | | | logic which get's nodename to work on all platforms (was failing on windows)
* Added test for --debug=json. Implemented DebugOptions(json). Create ↵William Deegan2023-06-051-5/+19
| | | | containing directory, and issue UserError if the directory is not creatable..
* Added test, CHANGES/RELEASE text. Fixturized SConstruct from ↵William Deegan2023-06-051-1/+0
| | | | test/option/debug-count.py, and used that in test/option/debug-json.py
* Merge remote-tracking branch 'upstream/master' into json_debug_time_outputWilliam Deegan2023-06-051-84/+169
|\
| * [ci skip] Fixed typoWilliam Deegan2023-05-231-1/+1
| |
| * Move pdb-support SConscript list to topMats Wichmann2023-05-091-9/+17
| | | | | | | | | | | | | | | | Define the list of recognized names for sconscript files for pdb to handle to the top, together with the existing list of names for SConstruct, to make it harder to miss any changes that should kept in sync. Signed-off-by: Mats Wichmann <mats@linux.com>
| * pdb: minor tweaks to doc [skip appveyor]Mats Wichmann2023-05-071-4/+7
| | | | | | | | | | | | | | Explanations of new "recognize sconscripts" behavior to debugger support are tweaked a bit to hopefully be more clear. Signed-off-by: Mats Wichmann <mats@linux.com>
| * pdb debugging now recognizes SConstruct/SConscriptMats Wichmann2023-05-061-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | Make it possible (once the project path has been added to sys.path) to set/clear breakpoints using file paths that end in SConstruct and SConscript - specializing pdb.Pdb to override the need for all paths that are not absolute to end in .py. Man: tried to address some surprise that pdb can't find the SConstruct when you start up in debugger mode. Signed-off-by: Mats Wichmann <mats@linux.com>
| * Merge branch 'master' into maint/validateOptionsWilliam Deegan2023-05-041-48/+49
| |\
| | * Add some cheap return and parameter annotationsMats Wichmann2023-05-011-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-141-34/+62
| |/ | | | | | | | | | | | | | | | | | | | | | | 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>
* | Added build info to json, added --debug=json to docsWilliam Deegan2023-06-041-1/+1
| |
* | Initial support for writing --debug=time, count into a JSON fileWilliam Deegan2023-06-041-1/+5
| |
* | added --debug=json, which will dump object counts and memory into ↵William Deegan2023-04-221-76/+30
|/ | | | scons_stats.json in invocation directory
* [ci skip] Update versionadded for ValidateOptions()William Deegan2023-03-021-1/+1
|
* Migrate Taskmaster tracing to use python loggingWilliam Deegan2022-10-221-12/+1
|
* move Taskmaster and Jobs to SCons.TaskmasterWilliam Deegan2022-10-121-3/+3
|
* doc and docstring updatesWilliam Deegan2022-08-171-6/+5
|
* Address doc and docstring feedback from mwichmannWilliam Deegan2022-08-161-1/+9
|
* Added throw_exception parameter to ValidateOptions() which allows you to ↵William Deegan2022-08-151-1/+4
| | | | 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 ValidateOption() API which validates that all command line options are ↵William Deegan2022-08-131-0/+11
| | | | either SCons specified or specifie by AddOption calls. It will error out if there are any unknown options. Resolves Issue #4187
* remove scons-ninja-daemon option in favor of interactiveDaniel Moody2022-03-141-3/+1
|
* fix up interactive to support ninja scons daemonDaniel Moody2022-02-111-2/+3
|
* 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-221-3/+6
|/
* Update post release changesWilliam Deegan2021-11-221-1/+1
|
* 4.3.0 updates4.3.0William Deegan2021-11-171-1/+1
|
* Post 4.2.0 merge/reset to development modeWilliam Deegan2021-08-011-1/+1
|
* Fix some imports and other checker warningsMats Wichmann2021-05-051-1/+0
| | | | | | | | | | | | | * 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>
* Dont call progress if the progress object is NullDaniel Moody2021-04-091-2/+3
|