| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
* Single-tuple CPPDEFINES was not handled.
* Add some more unit tests.
* Add some comments - that we need to keep in sync with processDefines,
but don't actually call it (the routine *could* be rewritten to process
the result of processDefines instead of the bare CPPDEFINES, but
currently doesn't do that).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPPDEFINES can contain name=value strings, either a single one, or one or
more in a sequence type. After conversion (subsequent Append/Prepend to
CPPDEFINES), these will be stored as tuples, but it is possible to hit
cases where the type conversion has never been triggered. The C Scanner
has its own routine to process CPPDEFINES, and missed these cases,
which are now handled.
The testcases in issue 4193 which showed this problem are now included
in the C scanner unit tests, and the test for dictifyCPPDEFINES is
expanded to check these two forms.
Fixes #4193
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
scan JAVAPROCESSORPATH
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The scanner now splits JAVACLASSPATH before searching only if it is passed
as a scalar (string); it no longer recurses to split elements of a list
value - this is more consistent with other SCons usage. No longer splits
on space, rather splits on os.pathsep, as considerably more useful for
a search-path variable. The latter change avoids breaking paths with
an embedded space (usually from Windows).
This is a "breaking change" from the new behavior introduced in 4.4 where
a JAVACLASSPATH like "aaa bbb ccc" would have been split into ["aaa",
"bbb", "ccc"] - now it will be left unchanged in the scanner. However a
JAVACLASSPATH like "aaa;bbb;ccc" will now be split into ["aaa", "bbb",
"ccc"]. This behavior only affects the scanner - there is no change in
how JAVACLASSPATH gets transformed into the "-classpath ARG" argument
when calling JDK elements. The former behavior was presumably unintended,
and definitely broke on a space-containing path (e.g. "My Classes".
The unit test is expanded to test for a path string with spaces, and
for a path string containing a search-path separator.
Documentation tweaks: explain better how JAVACLASSPATH (and the other two
Java path variables) can be specified, and whether or not SCons changes
them before calling the JDK commands. Added note that JAVABOOTCLASSPATH
is no longer useful, and a note about the side effect that SCons always
supplies a "-sourcepath" argument when calling javac.
Fixes #4243
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| |\
| | |
| | |
| | | |
feature/minor_java_improvements
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
A couple of unittest methods that a few SCons tests use have
been marked deprecated in Python 3.11, with replacements provided.
Partial fix for #4162, do not close just off this PR.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In converting CPPDEFINES to a dict, if an element is a single-item
sequence c, it would take an IndexError trying to access c[1]. This
could happen if AppendUnique has been called as it converts to tuples.
Fixes #4108
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| | |
Accidentally added two unused format strings.
Also referenced a variable from a copy-paste error.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
defaulted to md5.
Dir search now excludes all types of sconsfiles that are now created.
Environment now defaults to the current scons filename instead of .sconsfile
Sconsign now has a function used by a lot of code that gets the default sconsign filename
Any tests referring to .sconsfile have now been changed, including one old legacy test.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Maintenance and doc:
- add new sconsign filenames to skip_entry_list in Scanner/Dir.py
- modernize some usage in Scanner package such as calling super()
- switch some initializations to comprehensions
- some code formatting
- Docstring for scanner Base moved from init-method to class-level
so it's picked up by Sphinx (which skips dunder methods)
- Manpage tweaks
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| |
| |
| | |
A previous commit changed some of the existing logic incorrectly.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
| |
| |
| | |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Maintenance and doc:
- add new sconsign filenames to skip_entry_list in Scanner/Dir.py
- modernize some usage in Scanner package such as calling super()
- switch some initializations to comprehensions
- some code formatting
- Docstring for scanner Base moved from init-method to class-level
so it's picked up by Sphinx (which skips dunder methods)
- Manpage tweaks
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\
| |
| | |
Teach the Python scanner to find generated files and directories
|
| |
| |
| |
| | |
Better handle relative imports if no paths are provided.
|
| | |
|
| |
| |
| |
| | |
This change fixes all tests. It's still a a WIP change because I think the "imports" logic is wrong for file imports.
|
| | |
|
| |
| |
| |
| | |
Tests still break
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, added a __contains__ method instead,
not because it necessarily was needed, but for completeness.
Also one completely unrelated change because it happened to
be sitting modified in the tree when I committed modified files:
be a little more cautious about building CHECK_METHODS in
our subclassing of the optparse Option class... current
cpython starts it at None, then fills it in, so it shouldn't
be None when we subclass.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Eliminate unneeded imports, and a few unneeded statements -
usually "pass" where it is not syntactically needed.
A couple of import try blocks were eliminated or changed
when they're "cannot happen" due to current floor Python version.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
For issue #3113, but does not complete it - there are still uses of
TestSuite where the "simple fix" from the issue requires more thought.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renamed those documentation files named __init__.xml to the name of the
component directory.
Merged SCons/Tool/packaging.xml (which had no unique content) into
the renamed SCons/Tool/packaging/packaging.xml
Considerable rework was needed to the packaging content to
fill in some gaps:
* properly named the commandline option
* add the option to the manpage (with a note it's not always avail)
* only list the packagers once
* add example of selecting packaging tool, and of specifying multiple packagers
* more description of source, target and metadata for Packaging
* mention use of PACKAGEROOT
* redo tag description
* add a bit of explanation to the complete packaging example
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
In Python3 this is the default.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
| |
src/engine/SCons moved to SCons, affects wired in paths
in documentation, and doc building scripts
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
with current python packaging practices
|