MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / main

Function main

scripts/finalize_windows_dist.py:243–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241
242
243def main() -> None:
244 parser = argparse.ArgumentParser(description=(__doc__ or "").splitlines()[0])
245 parser.add_argument(
246 "--staging-dir",
247 type=Path,
248 default=REPO_DIR / "dist" / "signed",
249 help="Directory holding scenedetect-signed.zip and PySceneDetect-*-win64.zip.",
250 )
251 args = parser.parse_args()
252
253 staging = args.staging_dir.resolve()
254 if not staging.is_dir():
255 sys.exit(f"{staging} not found")
256
257 signed_bundle = staging / "scenedetect-signed.zip"
258 portable_zip = staging / f"PySceneDetect-{VERSION}-win64.zip"
259 if not signed_bundle.is_file():
260 sys.exit(f"{signed_bundle} not found")
261 if not portable_zip.is_file():
262 sys.exit(f"{portable_zip} not found")
263
264 sevenz = find_7zip()
265 print(f"Using 7-Zip: {sevenz}")
266 print(f"Staging dir: {staging}")
267 print(f"Version: {VERSION}")
268
269 with tempfile.TemporaryDirectory() as tmp:
270 signed_exe, signed_msi = extract_signed_bundle(signed_bundle, Path(tmp))
271 repack_portable(portable_zip, signed_exe, sevenz)
272 msi_dest = staging / signed_msi.name
273 shutil.copy2(signed_msi, msi_dest)
274 print(f"Copied signed MSI -> {msi_dest.name}")
275 write_manifests(staging, portable_zip, msi_dest)
276
277
278if __name__ == "__main__":

Callers 1

Calls 4

extract_signed_bundleFunction · 0.85
repack_portableFunction · 0.85
write_manifestsFunction · 0.85
find_7zipFunction · 0.70

Tested by

no test coverage detected