Files
sarasacw-omrf/packer/src/sarasacw_omrf_packer/archiver.py
T

11 lines
312 B
Python
Raw Normal View History

2026-08-01 22:31:39 +08:00
import zipfile
from pathlib import Path
def pack(dist_dir: str, output_zip: str) -> None:
dist = Path(dist_dir)
with zipfile.ZipFile(output_zip, "w", zipfile.ZIP_DEFLATED) as zf:
for path in dist.rglob("*"):
if path.is_file():
zf.write(path, path.relative_to(dist))