"""Package the authored material and runnable site, excluding credentials and build caches."""
from pathlib import Path
from zipfile import ZipFile,ZIP_DEFLATED
ROOT=Path(__file__).resolve().parents[1]
TARGET=ROOT/'dist/downloads/quantum-computing-2026-source.zip'
with ZipFile(TARGET,'w',ZIP_DEFLATED,compresslevel=9) as z:
 for name in ['content','dist','scripts','tests','README.md','package.json','site-origin.txt']:
  p=ROOT/name
  for f in sorted(p.rglob('*')) if p.is_dir() else [p]:
   if not f.is_file() or f==TARGET or '__pycache__' in f.parts or f.suffix=='.pyc':continue
   z.write(f,'quantum-computing-2026/'+str(f.relative_to(ROOT)))
print(TARGET.name,TARGET.stat().st_size,'bytes')
