diff options
author | Adam Gross <grossag@vmware.com> | 2020-06-22 19:10:43 (GMT) |
---|---|---|
committer | Adam Gross <grossag@vmware.com> | 2020-08-04 13:07:42 (GMT) |
commit | 1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d (patch) | |
tree | 34f1d076367301728471aa896e4a14e8082d5910 /SCons/Environment.py | |
parent | 05e2dc91e95507b3c0f1bd42b93f41c0c8733371 (diff) | |
download | SCons-1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d.zip SCons-1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d.tar.gz SCons-1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d.tar.bz2 |
Add support for overriding the default hash format
This change adds support for a new --hash-format parameter that can be used to
override the default hash format used by SCons. The default remains MD5, but
this allows consumers to opt into SHA1, SHA256, or any other hash algorithm
offered by their implementation of hashlib.
Diffstat (limited to 'SCons/Environment.py')
-rw-r--r-- | SCons/Environment.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py index bb57e37..8e2b51b 100644 --- a/SCons/Environment.py +++ b/SCons/Environment.py @@ -1492,10 +1492,8 @@ class Base(SubstitutionEnvironment): def Decider(self, function): copy_function = self._copy2_from_cache if function in ('MD5', 'content'): - if not SCons.Util.md5: - raise UserError("MD5 signatures are not available in this version of Python.") function = self._changed_content - elif function == 'MD5-timestamp': + elif function == ('MD5-timestamp', 'content-timestamp'): function = self._changed_timestamp_then_content elif function in ('timestamp-newer', 'make'): function = self._changed_timestamp_newer |