summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Remove python27 codeWilliam Deegan2020-04-091-49/+19
|
* [PR #3602] fix typo complained about by Sider [ci skip]Mats Wichmann2020-04-091-1/+1
| | | | | | enviroment -> environment (inside a docstring) Signed-off-by: Mats Wichmann <mats@linux.com>
* Add highlighting to funcs/builders [ci skip]Mats Wichmann2020-04-082-33/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | When generating documentation from SConsXML markup, add some markup to match the Python doc style better. In pseudo-markup, we will now get: <bold>foo</bold>(args) <italic>env</italic>.<bold>foo</bold>(args) That is, the function name is highlighted, and for the environment method, env looks like a variable (which it is), rather than the literal name env. The methods to create an element now take keyword args, so they can pass them on to the etree.Element method, which understands an attribute keyword we need for one of these changes. Added a method to create a SubElement, which makes usage clearer. To complement the *Text methods, *Tail methods were added to set/get the .tail attribute of a node. This change is to the tools only, and affects the result of doing "python bin/docs-update-generated.py". Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix generated tools doc intermediate file. [ci skip]Mats Wichmann2020-03-312-7/+21
| | | | | | | | | | | | | | | | | | The process to generate tools.gen writes entities for links to construction variables used/set by each tool. When this data is written out using lxml's tostring() method, this is encoded, causing &foo; to become &amp;foo; which then doesn't work in later processing as these files are included, as they're no longer valid entity references for substitution. This seems really hard to fix directly, because tostring() is working as documented by doing this, so for now - maybe forever in light of thoughts of converting docs to a different format - just postprocess the file to undo the damage. A hack, but fixes #3580 Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove obsolete scripts. Remove py27 supportWilliam Deegan2020-03-2120-327/+0
|
* [PR #3583] review comment: flag cElementTree use [ci skip]Mats Wichmann2020-03-151-0/+1
| | | | | | | | | cElementTree is deprecated in Py3 series, leave a TODO. Don't remove just yet, right now building the generated files may have problems in Py3, so leave ability to use Py2 for that (see issue #3580) Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix the packagers table again. [ci skip]Mats Wichmann2020-03-132-13/+3
| | | | | | | | | Trying yet another layout to make it look better. Minor tweaks to the doc production tools - dropping some very old usage (pre-Python-2.5). Signed-off-by: Mats Wichmann <mats@linux.com>
* post py27William Deegan2020-02-191-2/+2
|
* Fix reference to obsolete urllib.urlretrieve, now urllib.request.urlretrieveWilliam Deegan2020-02-181-1/+1
|
* more code cleanup found by pycharmWilliam Deegan2020-02-181-1/+1
|
* Fix sider found spelling errorWilliam Deegan2020-02-111-1/+1
|
* Fixed post release modeWilliam Deegan2020-02-111-3/+5
|
* fixed tests and some code to be testableWilliam Deegan2020-02-101-8/+17
|
* Updates work for develop modeWilliam Deegan2020-02-101-207/+245
|
* [ci skip] update to create #.#.#.devMMYYHHmmss as version string for devel ↵William Deegan2020-02-061-15/+18
| | | | builds. Pypi won't accept the format we had previously with .alpha.####
* fix error in scons-diff.py [ci skip]Mats Wichmann2019-12-241-1/+1
|
* [PR #3509] change tuple syntax per review comment [ci skip]Mats Wichmann2019-12-242-5/+5
| | | | | | | | | | | | | | | | A couple of tools in bin had argument-handling lines that looked like: elif o in ('--username') original change made that into a tuple: ('--username',) except where I missed it and the parens were just dropped. Now these are elif o == '--username' Skipped CI builds on this one since the change doesn't affect scons code itself and is not run by CI. Signed-off-by: Mats Wichmann <mats@linux.com>
* syntax fixups suggested by PyCharmMats Wichmann2019-12-235-29/+15
| | | | | | | | | | | | | | Drop unneeded parens. Drop trailing semicolons. Triple double-quote docstrings. Regexes drop unneeded escapes. Spaces around parens, braces: remove/add. Some one-tuples get their missing closing comma. A couple of sets use set init syntax {foo} instead of set([iter]) now. And a fiddle in Node to reduce lookup time on md5 signature functions (came about because of a line-too-long issue, initially) Signed-off-by: Mats Wichmann <mats@linux.com>
* Updates for README and logic to upload it to Sourceforge as part of the ↵3.1.2William Deegan2019-12-171-0/+6
| | | | normal upload script
* [PR #3343] fix review comments [ci skip]Mats Wichmann2019-12-053-6/+10
| | | | | | | | | | get importlib magic number from util sider complaints about unicode usage sider complaint about subprocess return value unused sider complaint about shutil import unused (it is used, but inside a big string that is written to a file to be executed) Signed-off-by: Mats Wichmann <mats@linux.com>
* Improve building of docs using Py3 [ci skip]Mats Wichmann2019-12-054-131/+187
| | | | | | | | | | | | | | | | | | | | * context managers on file r/w + use shutil.copy where it makes sense. * lxml wants (demands?) that xml files be processed as bytes * for the phase where we gen the entity files, read as text anyway * Need to solve a problem where the generated xml is putting the \n in literally, not evaluating it. * Fix some examples broken for py3 * Fix more octal constant instances * Cleanups suggested by PyCharm: staticmethods, two blanks before class definition, others. This addresses issues called out in #3300, but is not a complete solution because the actual doc build step still fails with the epydoc failures (which aren't directly because of Py3; epydoc build doesn't work any better on my system with Py3, even with the forked version with patches). Signed-off-by: Mats Wichmann <mats@linux.com>
* [skip ci] make scons_dev_master.py have proper shebang and also set executableWilliam Deegan2019-11-081-1/+1
|
* Merge pull request #3419 from mwichmann/benchWilliam Deegan2019-09-261-4/+6
|\ | | | | Update bench and timings dirs for Py3
| * Update bench and timings dirs for Py3Mats Wichmann2019-08-311-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor changes for compatibility. Cannot currently run these tests effectively: 1. One of the bench runs doesn't work on Py3 yet. is_types.py fails with: ``` Traceback (most recent call last): File "bench.py", line 91, in <module> exec(open(args[0], 'r').read()) File "<string>", line 16, in <module> AttributeError: module 'types' has no attribute 'InstanceType' ``` The test fundamentally depends on checking if a type is an instance as part of what's being timed; the problem is types.InstanceType was only meaningful for old-style classes where all instances have the same type. Since that can't happen in Python 3 with new-style classes only, types.InstanceType has been removed entirely. Is it worth trying to figure out how to rejigger the test? 2. The calibrarions on the timings configs are horribly wrong for the local machine (10x too small), but not sure what to calibrate them for. 3. The calibration algorithm sometimes goes off base. The objective is to converge on something just under 10 seconds, and hit it three times in a row. In this snippet #25 got close, then we keep iterating and get further away in #27, #29, #31, #33 (this particular calibration eventually hit it's three with runs #55-57. ``` run 25: 9.207: TARGET_COUNT=1019 run 26: 11.026: TARGET_COUNT=1106 run 27: 8.630: TARGET_COUNT=1003 run 28: 12.046: TARGET_COUNT=1162 run 29: 8.240: TARGET_COUNT=964 run 30: 12.062: TARGET_COUNT=1169 run 31: 8.232: TARGET_COUNT=969 run 32: 12.470: TARGET_COUNT=1177 run 33: 8.185: TARGET_COUNT=943 ``` 4. Running any of the timings fails with stdout mismatch, as there is (unexpected?) timing output. Example CPPPATH - see the second line of the captured output for the extra data. Is this new data emitted by debug=time that the timings code is not expecting? ``` /home/mats/.pyenv/versions/python-3.7.3/bin/python /home/mats/github/scons/src/script/scons.py DIR_COUNT=813 --debug=memory,time . STDOUT ========================================================================= 1,6c1,14 < scons:\ Reading\ SConscript\ files\ \.\.\.\ < scons:\ done\ reading\ SConscript\ files\.\ < scons:\ Building\ targets\ \.\.\.\ < scons:\ `\.'\ is\ up\ to\ date\.\ < scons:\ done\ building\ targets\.\ < .* --- > scons: Reading SConscript files ... > SConscript:/tmp/testcmd.256448.xbxk_gj1/SConstruct took 107.051 ms > scons: done reading SConscript files. > scons: Building targets ... > scons: `.' is up to date. > scons: done building targets. > Memory before reading SConscript files: 139239424 > Memory after reading SConscript files: 145399808 > Memory before building targets: 145399808 > Memory after building targets: 148684800 > Total build time: 0.311640 seconds > Total SConscript file execution time: 0.107460 seconds > Total SCons execution time: 0.204180 seconds > Total command execution time: 0.000000 seconds FAILED test of /home/mats/github/scons/src/script/scons.py ... from line 53 of timings/CPPPATH/TimeSCons-run.py ``` 5. CPPPATH timing config runs into a command-line length problem if calibrating. Might be a testcase for using a file for long command lines even in the gcc case? ``` run 1: 0.490: DIR_COUNT=813 1/1 (100.00%) /home/mats/.pyenv/versions/python-3.7.3/bin/python timings/CPPPATH/TimeSCons-run.py /home/mats/github/scons/src/script/scons.py returned 2 STDOUT ========================================================================= scons: Reading SConscript files ... SConscript:/tmp/testcmd.253125.kkqcvz12/SConstruct took 1186.979 ms scons: done reading SConscript files. scons: Building targets ... gcc -o foo.o -c -Iinc_0000 -Iinc_0001 -Iinc_0002 ... incredibly long line chopped ... Iinc_16574 -Iinc_16575 -Iinc_16576 -Iinc_16577 -Iinc_16578 -Iinclude foo.c scons: building terminated because of errors. Memory before reading SConscript files: 139243520 Memory after reading SConscript files: 233705472 Memory before building targets: 233705472 Memory after building targets: 255672320 Total build time: 5.079720 seconds Total SConscript file execution time: 1.189501 seconds Total SCons execution time: 3.890219 seconds Total command execution time: 0.000000 seconds FAILED test of /home/mats/github/scons/src/script/scons.py ... from line 53 of timings/CPPPATH/TimeSCons-run.py STDERR ========================================================================= scons: *** [foo.o] sh: Argument list too long Traceback (most recent call last): File "bin/calibrate.py", line 88, in <module> sys.exit(main()) File "bin/calibrate.py", line 69, in main elapsed = float(em.group(1)) AttributeError: 'NoneType' object has no attribute 'group' ``` Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge branch 'master' into remove_aegis_bits_issue_2639William Deegan2019-09-071-1/+1
|\ \
| * | Fix xml entity generation in examples [ci skip]Mats Wichmann2019-09-071-1/+1
| |/ | | | | | | | | | | | | | | Closes #3003: those examples which wanted to generate a phony address for a Python object were doing so incorrectly, causing output to end up with &amp;gt; instead of &gt;. Signed-off-by: Mats Wichmann <mats@linux.com>
* | purge aegis referencesWilliam Deegan2019-09-073-245/+0
| |
* | Remove scripts for svnWilliam Deegan2019-09-071-24/+0
|/
* Merge branch 'master' into fix_slow_md5_deciderWilliam Deegan2019-07-141-6/+5
|\
| * [ci skip] re-add generation of src-tar-gz and src-zip files as they're used ↵William Deegan2019-07-131-6/+6
| | | | | | | | by debian scons packager
* | Re-add src packages to upload scriptWilliam Deegan2019-07-141-6/+6
|/
* Fix some regexes for Python 3.8 complaintsMats Wichmann2019-05-131-2/+2
| | | | | | | | | | | Regexes that contained unescaped backslashes and were not listed in raw string form caused one more test failure when Python 3.8 was experimentally turned on in the Travis CI build. Also one utility script had the same, not affecting tests - found through inspection. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] test fixes for file closings, rawstringsMats Wichmann2019-04-251-90/+82
| | | | | | | On a linux host (missing some things that may be on the Travis CI setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages. Signed-off-by: Mats Wichmann <mats@linux.com>
* [PY 3.8] fix some sider complaints in #3331Mats Wichmann2019-03-301-0/+1
| | | | | | One was "real": had failed to indent a with: block Signed-off-by: Mats Wichmann <mats@linux.com>
* [WIP] [PY 3.8] fix more warningsMats Wichmann2019-03-302-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Clean up some file opens, regex stringsMats Wichmann2019-03-071-12/+17
| | | | | | | | | | | | | | | | | | 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>
* Changes for 3.0.4 release3.0.4William Deegan2019-01-231-1/+1
|
* Updates for Ubuntu 18.04 LTS build machineWilliam Deegan2019-01-071-2/+4
|
* comment out source package upload to sourceforge3.0.2William Deegan2019-01-011-5/+5
|
* Updates for 3.0.2William Deegan2019-01-011-7/+0
|
* Add xz compression to tar packaging choices.Mats Wichmann2018-09-271-8/+11
| | | | | | | | | | | A few tweaks to scons_dev_master.py which needed to have xz added anyway: changed mercurial to git in initial setup, install different java, more pythons. Note about adding ipkg-build. Docs updated slightly for wording in addition to adding the new tar packager. Signed-off-by: Mats Wichmann <mats@linux.com>
* [ci skip] Removing obsolete administrative script scons-cdist. Leftover from ↵William Deegan2018-04-301-272/+0
| | | | when SCons used aegis for revision control
* move test files from QMTest to testing/framework. QMtest hasn't been used in ↵William Deegan2018-04-303-8/+8
| | | | quite some time
* Fix wiki references to point to gihub wikiMats Wichmann2018-04-231-2/+4
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Replace all instances of `int main()` with `int main(void)`Jonathon Reinhart2018-02-111-1/+1
|
* Refactor some variable names. Create a SConstruct_created next to created ↵William Deegan2017-11-141-21/+27
| | | | files for document examples so the example code can be rerun manually to debug any issues found when running
* Add ability to regenerate a single example outputWilliam Deegan2017-11-141-2/+9
|
* minor improvements in script logicWilliam Deegan2017-11-141-5/+9
|
* remove reference to tools no longer included in SConsWilliam Deegan2017-09-021-9/+7
|
* add docs targetWilliam Deegan2017-09-011-1/+12
|