def print_tarball_size()

in tools/travis/box-upload.py [0:0]


def print_tarball_size(tarball):
    """Get and print the size of the tarball"""
    tarballsize = os.path.getsize(tarball)
    print("Size of tarball", tarball, "is", humanize.naturalsize(tarballsize))

    sha256_hash = hashlib.sha256()
    with open(tarball, "rb") as f:
        for byte_block in iter(lambda: f.read(4096), b""):
            sha256_hash.update(byte_block)
    print("SHA256 hash of tarball is", sha256_hash.hexdigest())