| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consistently use "not is" and "not in", many instances used
the form "not x is y" instead, which pylint objected to.
A couple of bare except clauses got a qualifier.
Files otherwise touched had trailing whitespace cleaned up as well.
These are all things that sider would complain about if a change
happened nearby, so this is pre-emptive.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sconsign required filename(s) or directory name(s) to do anything,
in their absence it just quits silently. Change so if filename
argument omitted, use the same default as scons - .sconsign.dblite.
print something in case of bad options.
add an extra info line in case the sconsign cannot be read due
to pickle protocol (when py2 used in a place where scons
previously run with py3)
Tweak the manpage a bit.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
| |
For PR #3331: the change in src/script/scons-time.py to use subprocess
in log_execute caused failures on Windows platform. For now, go back
to os.popen, but save the open descriptor so it can be closed (that
was the original warning being addressed).
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several locations with simple usage of deprecated "imp" module
changed to use "importlib". These match with work in #3159,
but this is not a complete implementation of #3159.
More regex patterns are changed to be raw strings.
Some strings which did not seem appropriate to change to raw
strings (e.g. contain embedded tabs, which Python should honor)
had backslashes escaped to avoid accidental Python interpretation.
Example:
'\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n'
Python 3.8 was Warning \M was an unknown escape.
More open().write(), open().read() style usage changed to use
context managers so the file is closed.
WIP part: even with Python 3.7, the tests which call sconsign.py
fail; oddly they do not fail without the patch to compat.py.
sconsign.py does an import using imp module (which is what
generates the errors) so needs to be updated anyway. It does not
quite fit the "simple usage" pattern - can't do a simple relative
import since sconsign is normally located elsewhere in the tree than
the main scons code body.
With this version of the patch, 700 tests now pass with 3.8, and
Warning messages reduced to 2800 (current master has 200 pass,
9000 warns)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With runtest now honoring the -j 2 option given to it in
CI setup on Windows, there were some problems where scons-time
tests could try to remove a test directory while some files
in it were still open (these locations were complained about
by Python 3.8 also).
Switch test framework to using mkdtemp also, and to not use
tempfile.template (usage of that and mktemp are long
deprecated)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
runtest change to run requested number of jobs exposed a concurrency
problem on Appveyor CI (Windows) builds - which seems to be due to
scons-time using mktemp to create a temporary directory name, and then
later creating the directory. In scons-time the timing window for
this is a bit longer than usual. Try using mkdtemp instead.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To fix some test problems for pypy, which seem more prone to
problems of lost data if files are written and not explicitly
closed, add context managers on file opens in scons-time.
Also quiets warnings which are emitted by the much noisier
Python 3.8. Changes are to the scons-time script and to
the framework.
After visual inspection of outputs while debugging, switched
the framework's created tools in the scons-time area to use
os.linesep instead of explicit '\\n' strings, tools should
operate in a native way.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier fix to running with scons-local when the directory is a
symlink (i.e. scons-local symlinked to scons-local-{versiontag} and
invoked as scons-local/scons.py) broke running scons when the
"executable" is a symlink. Restoring that behavior.
This is dodgy to test reliably on a developer system, as the
fallback mechansim to find a usable scons goes on to look for
a system-installed scons, so it looked like it was working. I
will add a test if I can figure out a good way.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
| |
whitespaces correctly
for example "#if(defined FOO)" or "#elif!(BAR)"
|
|
|
|
| |
universal python wheel can work on windows
|
|
|
|
|
|
|
|
| |
Rather than just silently moving on, emit warning messages
if id count does not match signature count; summarize at the
end if there were any warnings.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
| |
The previous fix changed a failing line that printed something that
could be bytes in Py3 to do a decode. But it turned out that value can
be either str or bytes and the change failed the sconsign tests.
Use a try block instead of unconditionally calling decode.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two locations which attempt to directly print an item tipped over on py3,
so they now decode().
There seem to be cases where implicit dependencies do not have signatures,
so instead of looping through the dep list and indexing into the signature
list (IndexError), the two lists are now zipped, which means nothing is
printed, but sconsign does not die (the zip technique is used in FS.py
in the engine).
Minor PEP8 changes: spaces around operators; shorter lines; two-blanks
rule around classes/functions. Also unused args changed to _ to show
it was intentional.
Manpage updated slightly - the internal whichdb function explicitly
looks for the .dblite suffix, so the claim that if it's not .dbm it
is assumed to be dblite was not true.
sconsign still will not work on a dblite file which is not suffixed
.dblite, but that is an existing problem, not a newly introduced one.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
scons-configure-cache.py can now show the cache configuration,
and some statistics (currently only a file count). Script
passes pep8 now.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
In the common script stanza, Previous version was generating some paths
that were not useful. Make sure the path pulled from package info is
not mangled into unsuability. General cleanup.
Write error message to stderr instead of stdout in scons.py.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by PyCharm. Includes three "real" changes:
1. src/engine/SCons/Node/__init__.py has a print statement in a function
which references 'self', but there is no 'self' defined (it is not
a method in a class). Guessing it should have been 'node'.
2. src/engine/SCons/Environment.py makes a call using 'kwbd' which is not
defined, looks like a copy-paste error and should be 'bd'.
3. src/engine/SCons/Tool/JavaCommon.py splits 'file', which is not
defined, was evidently supposed to be 'fn'.
These should be double-checked.
The rest are purely syntax: whitespace, dropping trailing semicolons,
using "is" to test for None, simplifying comparisons, normalizing
docstring commenting ("always triple double quotes"), unneeded
backslashes.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
| |
|
|
|
|
| |
First entry in sys.path is not always the script directory.
|
|
|
|
| |
src/script/scons.py
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Remove 'U' flag to open()
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | | |
When iterating over dict.items(), we do not need a new list.
|
| |/ |
|
|/ |
|
| |
|
|
|
|
| |
binary. py2/3
|
|
|
|
| |
file for py2/3
|
| |
|
| |
|
| |
|
|
|
|
| |
without dbm module installed. Revisit py3 issues after we get py2 working again
|
|\ |
|
| |\
| | |
| | |
| | | |
Improve a few docs and messages
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| | |
name (more smaller directories, because they tend to get huge otherwise)
|
| | |
|
| | |
|
| | |
|