| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When scons exits, it wants to take the opportunity to print any
diagnostics and statistics that may have been requested, so the
main routine traps the various ways it can quit. If code somewhere
calls sys.exit(), that generates a SystemExit exception.
The handling of that has not been quite correct - it simply takes
the exception instance, saves it, and later quits with sys.exit(saved).
This seemingly works fine for all other tested versions of Python,
but has interesting side effects with PyPy3.
Per the Python documentation:
If the value is an integer, it specifies the system exit status
(passed to C’s exit() function); if it is None, the exit status
is zero; if it has another type (such as a string), the object’s
value is printed and the exit status is one.
And in fact, PyPy3 does this: if the original call to sys.exit
took a value of 2, then the SystemExit exception triggers with
a class instance which does have an exit code of 2, which turns
up if you take the string repr of the instance, but when passed
to the final sys.exit, as it's not an integer it *prints* the 2,
and returns with an exit code of 1, just as in the documentation snip.
Not really sure if PyPy3 is wrong here, or the other Pythons are
letting something slide, but it's an easy fix: save off the code
stored in the exception instance for later use as the exit code,
instead of using the instance itself for that.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
| |
An earlier change updated some examples, this makes some tweaks to
the wording as well for Default, DEFAULT_TARGETS, etc. to clarify.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Existing Textfile and Substfile builders (and tool textfile)
are added to the defaults, so they do not need to be explicitly
specified in the tools list. The documentation sort of
implies these are default builders (by not saying anything)
so no doc change is made.
Fixes issue #3147
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Also handle_missing_SConscript(), internal interface added by
this patch series.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
| |
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testcases added to confirm the behavior of: first attempt
to call a non-existent script gives a deprecation warning,
additional ones give plain warning; True/False values for
must_warn behave as expected; if scons default is changed
to exception the call fails but if must_warn=False it
still works.
Tweaked the logic to actually get that last bit to work.
Also minor doc update.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SConscript call now takes an optional must_exist flag, which defaults
to False for compatiility with current behavior. If True, an exception
is raised if the file is missing. To improve readability, the
decision is moved off to a new function rather than being inline in
_SConscript.
A global setting to control the overall behavior is also added.
A deprecation warning is added for the current behavior, which is
printed only once.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |\
| |
| | |
Replace usage of unittest.TestSuite with unittest.main()
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
from documents. Also remove associated tests.
|
| |
|
|
| |
on command line
|
| |
|
|
|
|
|
|
|
| |
This fixes a regression introduced in scons-3.0.0, where
SConscripts containing python 2 print statements would cause
syntax errors even when executing scons with python 2.7.
This ensures backward compatibility, allowing users to build
legacy code with scons-3.0.0 without having to patch it.
|
| | |
|
| |
|
|
| |
could not be passed to SetOption
|
| |
|
|
| |
could not be passed to SetOption
|
| | |
|
| | |
|
| |
|
|
| |
test/packaging/rpm/internationalization.py was failing because an open in py3 without specified encoding with LANG=C was trying to decode the file as ascii and it contained unicode characters and was failing. So far I haven't found any tests failing from this change
|
| | |
|
| |
|
|
| |
threads
|
| | |
|
| | |
|
| |\
| |
| |
| | |
exec() must take a string, not a file object.
|
| | | |
|
| |/ |
|
| |\ |
|
| | | |
|
| |/
|
|
| |
optparse.Values is a classic class deepcopy works different than in py3 when it's a modern class (no more classic classes). The net of which is deepcopy will look for various methods to copy the objects state, __deepcopy__, something else, then __setstate__. When it checks for __setstate__ it trys on a blank SConsValue instance which doesn't have __defaults__ and so SConsValues ends up throwing a KeyError exception. deepcopy is looking for an AttributeError exception to know that __setstate__ is not available. Once it receives the appropriate exception, it then properly copies the object and scons interactive mode works with py3
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Note: please evaluate python 3.X compliance.
|
| | | |
|
| | |\ |
|
| | |\ \
| | | |
| | | |
| | | |
| | | | |
Hand-updated a few things to keep them python3-safe, and handled
several merge conflicts.
|
| | | | | |
|
| | | | | |
|