本文整理匯總了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