import hashlib


def compute_file_checksum(path):
    """ Compute a SHA1 checksum for a file. """

    with open(path, 'rb') as f:
        checksum = hashlib.sha1(f.read()).hexdigest()
    return checksum