in tools/build-release.py [0:0]
def write_checksum(tarball_file, tarball_name):
print("generating sha512 checksum file for tar")
h = hashlib.sha512()
# read the file and generate the sha
with open(tarball_file, 'rb') as file:
while True:
data = file.read(65536)
if not data:
break
h.update(data)
sha = h.hexdigest()
# write out the checksum
sha_file = open(tarball_file + ".sha512", "w")
sha_file.write(sha)
sha_file.write(" " + tarball_name)
sha_file.write("\n")
sha_file.close()
print("sha512 checksum: %s" % sha)