summaryrefslogtreecommitdiffstats
path: root/src/script
Commit message (Collapse)AuthorAgeFilesLines
* purge aegis referencesWilliam Deegan2019-09-071-23/+1
|
* Some more lint-derived cleanupsMats Wichmann2019-04-272-12/+12
| | | | | | | | | | | | 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>
* Give sconsign a default filename.Mats Wichmann2019-04-051-39/+50
| | | | | | | | | | | | | | | | 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>
* [PY 3.8] tempoary fix: move imp importMats Wichmann2019-03-301-1/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] roll back scons-time to use os.popenMats Wichmann2019-03-301-4/+8
| | | | | | | | | 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>
* [WIP] [PY 3.8] fix more warningsMats Wichmann2019-03-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [PR #333] close files to avoid scons-time racesMats Wichmann2019-03-291-11/+17
| | | | | | | | | | | | | | 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>
* [PR #3330] try to eliminate race in scons-timeMats Wichmann2019-03-291-23/+3
| | | | | | | | | | 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>
* Merge branch 'master' into scons-symlinkWilliam Deegan2019-03-121-4/+12
|\
| * [PYPY] [PY 3.8] add context mgr use in scons-timeMats Wichmann2019-03-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | scons-local version has symlink problemsMats Wichmann2019-01-192-2/+2
|/ | | | | | | | | | | | | | 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>
* Enhance cpp scanner regex logic to detect if/elif expressions without ↵Tobias Herzog2019-01-181-0/+0
| | | | | | whitespaces correctly for example "#if(defined FOO)" or "#elif!(BAR)"
* Update scons.bat to first look for scons.py and then scons so that a ↵William Deegan2019-01-081-0/+2
| | | | universal python wheel can work on windows
* For sconsign, add a warning message if missing sigsMats Wichmann2018-12-011-3/+56
| | | | | | | | 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>
* For PR #3238: suggestion to use a comprehensionMats Wichmann2018-12-011-3/+2
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* For PR #3238: use a try block for str/bytes problemMats Wichmann2018-12-011-1/+4
| | | | | | | | | 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>
* Some fixes to sconsignMats Wichmann2018-12-011-21/+47
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update and add show option to cache configMats Wichmann2018-10-291-46/+83
| | | | | | | | 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>
* Get a little smarter about finding the scons engine.Mats Wichmann2018-10-122-90/+97
| | | | | | | | | | 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>
* A few syntax cleanupsMats Wichmann2018-10-032-4/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* Do not add unnormalised entries to PATH in scons.batRay Donnelly2018-01-181-1/+3
|
* Apply fix for sconsign.py as wellChristian Sandberg2017-09-241-1/+1
|
* Fix usage on embedded PythonChristian Sandberg2017-09-241-1/+1
| | | | First entry in sys.path is not always the script directory.
* py2/3 fix version checking for valid versions of python to 2.7.x >=3.5.0: ↵William Deegan2017-06-231-5/+5
| | | | src/script/scons.py
* Remove ancient Aegis revision control system filesJane Doe2017-05-301-5/+0
|
* Dirty hack for failing test/sconsign/script/Configure.pyGaurav Juvekar2017-04-141-0/+5
|
* remove py3 checking codeWilliam Deegan2017-03-131-7/+1
|
* Merged in rodrigc/scons (pull request #409)William Deegan2017-03-131-5/+5
|\ | | | | | | Remove 'U' flag to open()
| * Remove 'U' flag to open() which is deprecated.Craig Rodrigues2017-03-111-2/+2
| |
| * Remove 'U' flag to open() which is deprecated.Craig Rodrigues2017-03-111-3/+3
| |
* | Merged in rodrigc/scons (pull request #410)William Deegan2017-03-132-2/+2
|\ \ | | | | | | | | | When iterating over dict.items(), we do not need a new list.
| * | When iterating over dict.items(), we do not need a new list.Craig Rodrigues2017-03-122-3/+3
| |/
* | Use print() function. Fixes py2/3.Craig Rodrigues2017-03-111-3/+5
|/
* use whichdb from dbm for py3, and whichdb from whichdb for py2William Deegan2017-03-111-8/+8
|
* fix binary/non-binary file writes where appropriate, previous all were ↵William Deegan2017-02-281-1/+1
| | | | binary. py2/3
* fix float formatting and change writting output from binary to non binary ↵William Deegan2017-02-281-2/+4
| | | | file for py2/3
* comment out code which checks for py3 and failsWilliam Deegan2017-02-281-5/+5
|
* manually merge packaging updates from 2.5.1William Deegan2016-11-031-0/+1
|
* Futurize stage 2 2to3 fixes only.William Blevins2016-09-202-140/+140
|
* revert some py3 changes which fail no py2 on windows and any platform/python ↵William Deegan2016-05-151-3/+13
| | | | without dbm module installed. Revisit py3 issues after we get py2 working again
* Commit resolved conflicted merge.Russel Winder2016-04-102-2/+141
|\
| * Merged in techtonik/scons (pull request #308)William Deegan2016-04-091-2/+2
| |\ | | | | | | | | | Improve a few docs and messages
| | * script/scons.py - improve error message on missing engine filesanatoly techtonik2016-03-021-2/+2
| | |
| * | Add some error recovery, cleanup scons-configure-cacheThomas Tanner2016-03-191-18/+34
| | |
| * | Cleanup of code/comments and rename and rewrite of upgrade scriptThomas Tanner2016-03-192-78/+123
| | |
| * | improve behaviourThomas Tanner2016-03-121-7/+23
| | |
| * | Change the cache to use the first two characters of the md5 for the directoryThomas Tanner2016-01-301-0/+62
| |/ | | | | | | name (more smaller directories, because they tend to get huge otherwise)
* | Remove all the six stuff.Russel Winder2016-02-021-8/+2
| |
* | Some more print statements to functions.Russel Winder2016-01-011-1/+2
| |
* | Run futurize --stage1.Russel Winder2016-01-011-0/+2
| |