summaryrefslogtreecommitdiffstats
path: root/SCons/SConsign.py
Commit message (Collapse)AuthorAgeFilesLines
* "Modernize" to Python 3.6 via toolMats Wichmann2023-08-041-6/+6
| | | | | | | | | | | | | | | | | | | | | $ pyupgrade --py36-plus $(<filelist) Here's mostly what it's done: - No more 'stringliteral'.encode('utf-8'): now b'stringliteral' - No more unicode literals - the default open mode is 'r', leaves out if default - some f-string conversions (if shorter) - catch OSError instead of subclasses - no more mention of "object" - generator expression instead of list comp. when safe - a few tests had a shebang but actually began with blank line - remove coding: utf-8 comment, per pep 3120 this is the default now Manually - if a file in test/ was modified, then did the copyright header conversion. Signed-off-by: Mats Wichmann <mats@linux.com>
* [ci skip] fixed typo in CHANGES.txt/RELEASE.txtWilliam Deegan2023-06-201-0/+1
|
* maintenance: update/cleanup dblite moduleMats Wichmann2023-06-191-19/+7
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-19/+19
| | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* Use super call instead of direct class callMats Wichmann2022-03-151-3/+3
| | | | | | | | | - super used where direct call to superclass existed - convert a few older-style super() (two-argument) uses - in a few places, where there was an intersection with a super change, variables that override a builtin (e.g. "dict") were renamed. Signed-off-by: Mats Wichmann <mats@linux.com>
* Normalized all sconsfiles and sub-sconsfiles to use algorithm if not ↵Jacob Cassagnol2021-11-101-13/+15
| | | | | | | | | defaulted to md5. Dir search now excludes all types of sconsfiles that are now created. Environment now defaults to the current scons filename instead of .sconsfile Sconsign now has a function used by a lot of code that gets the default sconsign filename Any tests referring to .sconsfile have now been changed, including one old legacy test.
* Tests pass in python 3.6 and 3.9 in LinuxJacob Cassagnol2021-11-091-2/+9
| | | | | | | | | | | | | | | Modified failing tests to use the new defaulted .sconsign database based on the hash algorithm For MD5, default database will be .sconsign.dblite For other algorithms the default will be .sconsign_<hashname>.dblite. For all cases where the user changes the hash algorithm used, the database will be .sconsign_<hashname>.dblite (including md5) For sub-scons directories it remains as .sconsign Also added unit-tests for Util.py for the new hash default changes. It's difficult to setup a fips-compliant platform using containers, and instead we mock that. option--config uses multiple types of hash algorithms so was skipped. Removed one f-string (python 3.5 doesn't support those) Corrupt.py is using an explicit .sconsign so that was left as-is, and only the parent default .sconsign was changed for work test 1. A fetch-database name option was added to the testing framework. The unlink_sconsignfile was not updated as no usages of it were found.
* Merge branch 'master' into topic/grossag/newhashesWilliam Deegan2021-03-071-1/+10
|\
| * [PR #3884] fix some timinng errors from initial submitMats Wichmann2021-02-091-3/+3
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| * Add timing of sconsign write if --debugMats Wichmann2021-02-081-1/+10
| | | | | | | | | | | | | | | | | | | | | | A line is now emitted showing sconsign sync time if --debug=time Some calls to time.time replaced with time.perf_counter, where the objective was to time sections of code (i.e. where there wasn't an actual need to get time-since-epoch) - Python recommends this as getting the best-available timer. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge branch 'master' into topic/grossag/newhashesWilliam Deegan2020-12-121-5/+7
|\ \ | |/
| * dblite tweaksMats Wichmann2020-11-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | use os.replace instead of the dance around os.rename which behaves differently on Windows. use True/False for flags for clarity. Fix some PEP8 warnings. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Change the default sconsign DB file name if the hash is overriddenAdam Gross2020-11-121-1/+9
|/ | | | | | This was requested in the code review. The sconsign database file name is still .sconsign.dblite if the hash format is not overridden, but if it is, the name will be something like .sconsign_sha256.dblite.
* Update some copyright strings and drop __revision__ [skip appveyor]Mats Wichmann2020-09-231-9/+4
| | | | | | | | | | | | | | | | | | Touches the first and second levels of SCons (except SCons.Tool), not tests or docs which remain TODO. Make sure docstring is first non-comment content, eliminate cases where docstring is set elsewhere but assigns to __doc__ - this approach of course worked inside Python, but confuses various tools. Some module-level docstrings modified a bit, in particular the convention of having the name of the module as the first line is dropped, replaced by a summary description going there instead - this improves the look in the API Docs, which otherwise display something like: SCons.Foo - SCons.Foo Signed-off-by: Mats Wichmann <mats@linux.com>
* classes no longer explicitly inherit from objectMats Wichmann2020-05-241-2/+2
| | | | | | In Python3 this is the default. Signed-off-by: Mats Wichmann <mats@linux.com>
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-0/+430
with current python packaging practices