summaryrefslogtreecommitdiff
path: root/SCons/Environment.py
diff options
context:
space:
mode:
authorAdam Gross <grossag@vmware.com>2020-06-22 15:10:43 -0400
committerAdam Gross <grossag@vmware.com>2020-08-04 09:07:42 -0400
commit1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d (patch)
tree34f1d076367301728471aa896e4a14e8082d5910 /SCons/Environment.py
parent05e2dc91e95507b3c0f1bd42b93f41c0c8733371 (diff)
downloadscons-git-1fa19ef5eeb2b37c54d291a5aa5858b7b91bbb5d.tar.gz
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.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py
index bb57e37c3..8e2b51b06 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