| 81 | |
| 82 | |
| 83 | def archive_executables() -> None: |
| 84 | # Typically '_installed-vs2022-x64'. |
| 85 | install_dir = next(d for d in REPO_PATH.iterdir() if d.is_dir() and d.name.startswith("_installed")) |
| 86 | |
| 87 | for file in (install_dir / "bin").iterdir(): |
| 88 | if file.suffix.lower() != ".exe": |
| 89 | continue |
| 90 | zip_name = ZIP_TEMPLATE.format(package_name=file.stem) |
| 91 | with ZipFile(OUTPUT_DIR / zip_name, "w", compression=zipfile.ZIP_DEFLATED) as zipf: |
| 92 | zipf.write(file, arcname=file.name) |
| 93 | print(f"{file} -> {zip_name}") |
| 94 | |
| 95 | |
| 96 | def archive_python_package(python_version: str, python_path: Path) -> None: |