import hashlib


def sha1_checksum(filepath):
    """
    Calc sha1 checksum
    """
    sha1 = hashlib.sha1()
    with open(filepath, "rb") as f:
        while True:
            data = f.read(64 * 1024)
            if not data:
                break
            sha1.update(data)

    return sha1.hexdigest()