#NEWLINE# @ classmethod #NEWLINE# def zip_hash( cls , zf , prefix = '' ) : #NEWLINE# #INDENT# 'Return the hash of the contents of a zipfile, comparable with a cls.dir_hash.' #NEWLINE# prefix_length = len ( prefix ) #NEWLINE# names = sorted ( ( name [ prefix_length : ] for name in zf . namelist ( ) if ( name . startswith ( prefix ) and ( not name . endswith ( '.pyc' ) ) and ( not name . endswith ( '/' ) ) ) ) ) #NEWLINE# def stream_factory( name ) : #NEWLINE# #INDENT# return zf . open ( ( prefix + name ) ) #NEWLINE# #UNINDENT# return cls . _compute_hash ( names , stream_factory )