| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Remove Python 3.6 support
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
No claim is made about when it will actually be dropped,
but some notice seems polite.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
$ 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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
quiet some linting warnings where the use is intentional
|
|
|
|
| |
logic which get's nodename to work on all platforms (was failing on windows)
|
|
|
|
| |
containing directory, and issue UserError if the directory is not creatable..
|
|
|
|
| |
test/option/debug-count.py, and used that in test/option/debug-json.py
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
|
| | |
|
|/
|
|
| |
scons_stats.json in invocation directory
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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
|
|
|
|
| |
either SCons specified or specifie by AddOption calls. It will error out if there are any unknown options. Resolves Issue #4187
|
| |
|
| |
|
|\
| |
| | |
Fix tests to not hang on Windows with bad .py assoc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|