summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated {Source,Target}SignaturesMats Wichmann2019-10-201-2/+0
| | | | | | | | | | These two have been deprecated since 2010 (about SCons 2.0), commit 935e6985. Methods are removed, setoption for setting them removed, doc is removed, tests are migrated to test/Removed/*/Old with a sconstest.skip file so they don't run, and two new tests are added to confirm that using the functions and setoptions generate exceptions. Signed-off-by: Mats Wichmann <mats@linux.com>
* Added debug option "timestamp", changed option "timestamp" to ↵Edoardo Bezzeccheri2019-10-092-7/+7
| | | | | | "action_timestamps" As per PR review
* Added debug option "timestamp", implementationEdoardo Bezzeccheri2019-10-012-2/+10
|
* Remove deprecated debug optionsMats Wichmann2019-09-121-4/+16
| | | | | | | | | | | | | | | | | These options have been deprecated since 2007. They were originally announced to be disabled in SCons 2.0.0, but that didn't happen. Left the deprecated-debug-options behavior is in, but the dictionary of such options is now empty, and there's a new dict of removed options, and presence in that dict raises an exception. The four tests that were in test/Deprecated move to a new directory test/Removed and are simplified just to make sure invocation errors scons out. (git interprets most of these as remove/add for some reason) These appear to have been already removed from docs, so no doc impact. Signed-off-by: Mats Wichmann <mats@linux.com>
* Some more lint-derived cleanupsMats Wichmann2019-04-272-4/+4
| | | | | | | | | | | | 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>
* Fixup some code triggering pylint errors.Mats Wichmann2019-04-212-54/+23
| | | | | | | | | | | | | | | | | | | | Assorted fixups: exception types, redefined functions, globals, etc. Some old code removed to resolve issues (hashlib is always present on modern Pythons; no longer need the code for 2.5-and-earlier optparse). cmp is not a builtin function in Py3, drop one (unused) use; replace one. Fix another instance of renaming to SConsEnvironmentError. TODO flagged some instances of doing a raise without argument but not inside a try block - this is not considered legal, since raise with no argument is for re-raising an exception, but I don't know exactly how to resolve this in these cases. Also flagged an instance of raising an int instead of an exception class. We can either leave these as markers or update the PR. Signed-off-by: Mats Wichmann <mats@linux.com>
* Clean up some file opens, regex stringsMats Wichmann2019-03-071-5/+6
| | | | | | | | | | | | | | | | | | Most recent Python (3.8 alpha) spews warnings aplenty about two subjects: unclosed files and strings which look like they have embedded escapes that Python does not recognize. The latter are usually regexes, and it provides a reminder that regular expressions should normally be specified as raw strings, so Python does not attempt to interpret them. Irritating is that even docstrings are flagged, it's not obvious what the right answer is for a docstring which contains, say, a Windows-style path with backslashes. This converts a bunch of opens that are not closed into context manager usage and regex patterns into raw strings. This eliminate about 4000 warnings spewed by Py3.8 (9200 remain). Signed-off-by: Mats Wichmann <mats@linux.com>
* [PYPY] fix way exit status is retrieved in mainMats Wichmann2019-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Work on Default docu wording a bit moreMats Wichmann2019-01-191-0/+4
| | | | | | | 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>
* Add Textfile/Substfile to default.Mats Wichmann2018-11-171-0/+2
| | | | | | | | | | | | 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>
* corrections after bdbaddog's code reviewPaweł Tomulik2018-11-103-8/+8
|
* initial support for virtualenvPaweł Tomulik2018-11-103-1/+23
|
* Fix for #3162: tweak SConscript() docstrings a little moreMats Wichmann2018-07-301-10/+18
| | | | | | | Also handle_missing_SConscript(), internal interface added by this patch series. Signed-off-by: Mats Wichmann <mats@linux.com>
* Some further adjustments to missing-sconscript testsMats Wichmann2018-07-301-2/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Add a docstring for SConscript()Mats Wichmann2018-07-291-1/+25
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Add tests for SConscript(must_warn) optionMats Wichmann2018-07-282-9/+11
| | | | | | | | | | | | | | 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>
* Add ability for SConscript to fail on missing scriptMats Wichmann2018-07-213-6/+46
| | | | | | | | | | | | | | | 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>
* Merge pull request #3148 from swuecho/fix_testWilliam Deegan2018-07-151-8/+1
|\ | | | | Replace usage of unittest.TestSuite with unittest.main()
| * Replace usage of unittest.TestSuite with unittest.main()Hao Wu2018-07-121-8/+1
| |
* | Swap to use cleaner check for py 3.7 or above from @serhiy-storchakaWilliam Deegan2018-07-151-2/+1
| |
* | Fix -jN for Python3.7, which always has thread supportGary Oberbrunner2018-07-131-1/+5
|/
* Added in support for Sconstruct.pygrbd2018-04-151-1/+1
|
* Added sconstruct.py lowercasegrbd2018-04-021-1/+1
|
* Also search for SConstruct.py, to make VStudio debugging easiergrbd2018-04-011-1/+1
|
* Reenable parallel builds with PypyWilliam Deegan2018-03-251-1/+3
|
* Fix HOWTO/README. Remove vestiges of Option(). [ci skip]William Deegan2018-02-191-2/+0
|
* Remove SCons.Options code which has long been deprecated and already removed ↵William Deegan2018-01-301-7/+0
| | | | from documents. Also remove associated tests.
* Add printing time processing each SConscript when --debug=time is specified ↵William Deegan2017-10-201-0/+9
| | | | on command line
* Support python 2 print statements in SConscriptsThomas Berg2017-09-251-2/+0
| | | | | | | | | 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.
* Fix many epydoc warningsWilliam Deegan2017-09-011-11/+8
|
* Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option ↵William Deegan2017-08-201-0/+8
| | | | could not be passed to SetOption
* Fix Bug #2486 - Allow SetOption('silent',True) - Previously this option ↵William Deegan2017-08-201-0/+1
| | | | could not be passed to SetOption
* Added support for a PyPackageDir functiongrbd2017-08-031-0/+1
|
* Remove ancient Aegis revision control system filesJane Doe2017-05-301-5/+0
|
* py2/3 change to read sconscripts as binary file. at least ↵William Deegan2017-04-101-3/+4
| | | | 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
* fix breaking windows check for functional parallel buildsWilliam Deegan2017-04-071-3/+3
|
* py2/3 use sysconfig.get_config_var('WITH_THREAD') to determine if python has ↵William Deegan2017-04-061-1/+5
| | | | threads
* py2/3 remove wb from created taskmaster trace fileWilliam Deegan2017-03-131-1/+1
|
* When iterating over dict.items(), we do not need a new list.Craig Rodrigues2017-03-122-2/+2
|
* Merged in rodrigc/scons (pull request #404)William Deegan2017-03-121-1/+1
|\ | | | | | | exec() must take a string, not a file object.
| * exec() must take a string, not a file object. Fixes py2/3Craig Rodrigues2017-03-111-1/+1
| |
* | Replace list(filter()) with list comprehension.Craig Rodrigues2017-03-112-2/+2
|/
* Merged scons/scons into defaultWilliam Deegan2017-03-101-2/+2
|\
| * Use print() function to fix py2/3Craig Rodrigues2017-03-101-2/+2
| |
* | Fixing SConsValues to work with py2/3. Turns out because in py2 ↵William Deegan2017-03-101-1/+14
|/ | | | 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
* PEP-8 changesWilliam Deegan2017-02-261-0/+6
|
* Futurize stage 2 2to3 fixes only.William Blevins2016-09-204-5/+5
|
* merge python3 branch to defaultWilliam Deegan2016-05-235-53/+66
|\
| * Fixing StringIO usage.William Deegan2016-05-191-1/+1
| |
| * Fix py2/3 StringIO importWilliam Deegan2016-05-191-1/+6
| |