示例#1
0
文件: srcdir.py 项目: citibeth/ectl
def update_hash(src_dir, hash):
    """Hashes an entire ModelE source directory"""
    src_files = sorted(list_src_files(src_dir))
    for file in src_files:
        fname = os.path.join(src_dir, file)
        with open(fname) as fin:
            code = fin.read()
#            print('Hashing %s' % fname)
            xhash.update(code, hash)
示例#2
0
def update_hash(src_dir, hash):
    """Hashes an entire ModelE source directory"""
    src_files = sorted(list_src_files(src_dir))
    for file in src_files:
        fname = os.path.join(src_dir, file)
        with open(fname) as fin:
            code = fin.read()
            #            print('Hashing %s' % fname)
            xhash.update(code, hash)
示例#3
0
 def update_hash(self, hash):
     xhash.update(self.build, hash)
示例#4
0
 def update_hash(self, hash):
     xhash.update(self.sources, hash)
     xhash.update(self.components, hash)
     xhash.update(self.defines, hash)
示例#5
0
 def test_simple_hash(self):
     """Just tests that the hash algorithm runs"""
     hash = hashlib.md5()
     xhash.update({'a' : 5, 'b' : 4}, hash)
     xhash.update(17, hash)
     xhash.update(('foo', 'bar'), hash)
示例#6
0
文件: __init__.py 项目: citibeth/ectl
 def update_hash(self, hash):
     xhash.update(self.build, hash)
示例#7
0
文件: __init__.py 项目: citibeth/ectl
 def update_hash(self, hash):
     xhash.update(self.sources, hash)
     xhash.update(self.components, hash)
     xhash.update(self.defines, hash)
示例#8
0
文件: setup.py 项目: citibeth/ectl
def pkghash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    srcdir.update_hash(src_dir, hash)
    return hash.hexdigest()
示例#9
0
文件: setup.py 项目: citibeth/ectl
def buildhash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    xhash.update(src_dir, hash)    # Source directory
    return hash.hexdigest()
示例#10
0
def pkghash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    srcdir.update_hash(src_dir, hash)
    return hash.hexdigest()
示例#11
0
def buildhash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    xhash.update(src_dir, hash)  # Source directory
    return hash.hexdigest()