mirror of https://gitlab.com/ita1024/waf.git
Issue 1382, hash randomization on python 3.3 causes reconfigurations
This commit is contained in:
parent
1a2e877d33
commit
ea549ae36e
|
@ -334,7 +334,7 @@ class ConfigurationContext(Context.Context):
|
|||
:type node: :py:class:`waflib.Node.Node`
|
||||
"""
|
||||
super(ConfigurationContext, self).post_recurse(node)
|
||||
self.hash = hash((self.hash, node.read('rb')))
|
||||
self.hash = Utils.h_list((self.hash, node.read('rb')))
|
||||
self.files.append(node.abspath())
|
||||
|
||||
def eval_rules(self, rules):
|
||||
|
|
|
@ -567,7 +567,7 @@ def autoconfigure(execute_method):
|
|||
else:
|
||||
h = 0
|
||||
for f in env['files']:
|
||||
h = hash((h, Utils.readf(f, 'rb')))
|
||||
h = Utils.h_list((h, Utils.readf(f, 'rb')))
|
||||
do_config = h != env.hash
|
||||
|
||||
if do_config:
|
||||
|
|
|
@ -478,7 +478,8 @@ def quote_define_name(s):
|
|||
|
||||
def h_list(lst):
|
||||
"""
|
||||
Hash lists. For tuples, using hash(tup) is much more efficient
|
||||
Hash lists. For tuples, using hash(tup) is much more efficient,
|
||||
except on python >= 3.3 where hash randomization assumes everybody is running a web application.
|
||||
|
||||
:param lst: list to hash
|
||||
:type lst: list of strings
|
||||
|
|
Loading…
Reference in New Issue