def checksum_file(path):
    """windows has silly git behavior that adds newlines, and python does
    silly things if we just open(..., 'r').encode('utf-8').
    """
    with open(path, "rb") as fp:
        # We strip the file contents because we want the checksum to match the stored contents
        hashed = hashlib.sha256(fp.read().strip()).hexdigest()
    return {
        "name": "sha256",
        "checksum": hashed,
    }
windows has silly git behavior that adds newlines, and python does
    silly things if we just open(..., 'r').encode('utf-8').
    
tests/functional/artifacts/expected_manifest.py