check_vendored: ignore __pycache__ under the vendored trees (an import of gguf-py writes bytecode there)

This commit is contained in:
Niko1221 committed 2026-11-09 04:38:03 +01:00
1 parent 237ecb176a
commit cc8c29f313
1 file changed
+2 -1
+2 -1
View File
@@ -143,7 +143,8 @@ def check_tree(root, tree_rel, upmap, upstream, problems):
problems.append("%s: not in the upstream tree %s" % (rel, upstream))
elif sha(q) != up:
problems.append("%s: upstream hash in the manifest differs from %s" % (rel, q))
for d, _dirs, files in os.walk(tree):
for d, dirs, files in os.walk(tree):
dirs[:] = [x for x in dirs if x != "__pycache__"] # bytecode written by an import of the vendored package is not a file of the tree
for f in files:
rel = os.path.relpath(os.path.join(d, f), tree).replace(os.sep, "/")
if rel in NOT_LISTED or (rel == "LICENSE" and upmap is None):