本文整理汇总了Python中waflib.Utils.md5方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.md5方法的具体用法?Python Utils.md5怎么用?Python Utils.md5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Utils
的用法示例。
在下文中一共展示了Utils.md5方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: uid
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import md5 [as 别名]
def uid(self):
try:
return self.uid_
except AttributeError:
# this is not a real hot zone, but we want to avoid surprizes here
m = Utils.md5()
up = m.update
up(self.__class__.__name__.encode())
for x in self.inputs + self.outputs:
up(x.path_from(x.ctx.srcnode).encode())
self.uid_ = m.digest()
return self.uid_
示例2: uid
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import md5 [as 别名]
def uid(self):
try:
return self.uid_
except AttributeError:
# this is not a real hot zone, but we want to avoid surprises here
m = Utils.md5()
up = m.update
up(self.__class__.__name__.encode())
for x in self.inputs + self.outputs:
up(x.path_from(x.ctx.srcnode).encode())
self.uid_ = m.digest()
return self.uid_
示例3: uid
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import md5 [as 别名]
def uid(self):
try:
return self.uid_
except AttributeError:
m=Utils.md5()
up=m.update
up(self.__class__.__name__)
for x in self.inputs+self.outputs:
up(x.abspath())
self.uid_=m.digest()
return self.uid_
示例4: signature
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import md5 [as 别名]
def signature(self):
try:return self.cache_sig
except AttributeError:pass
self.m=Utils.md5()
self.m.update(self.hcode)
self.sig_explicit_deps()
self.sig_vars()
if self.scan:
try:
self.sig_implicit_deps()
except Errors.TaskRescan:
return self.signature()
ret=self.cache_sig=self.m.digest()
return ret