mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 07:18:50 +00:00
The script that makes the next commit (move_0216.py and its edit list), the checks used to test it (the Windows per-file runner, the archive and zip comparisons, the failure-site reader, the path scan), and the file-split script for serve/server.py. They stay in tools/layout after the move. README.md in that folder says how to run each.
13 lines
527 B
Python
13 lines
527 B
Python
"""python -I zip_content_diff.py <before.zip> <after.zip>: members (outside python/) whose bytes differ (CRC)."""
|
|
import sys
|
|
import zipfile
|
|
|
|
crc = []
|
|
for p in sys.argv[1:3]:
|
|
with zipfile.ZipFile(p) as z:
|
|
crc.append({i.filename.split("/", 1)[1]: i.CRC for i in z.infolist() if "/" in i.filename and not i.filename.split("/", 1)[1].startswith("python/")})
|
|
diff = sorted(n for n in crc[0] if n in crc[1] and crc[0][n] != crc[1][n])
|
|
print("%d members differ in content:" % len(diff))
|
|
for n in diff:
|
|
print(" " + n)
|