(path, base_path, archive)
| 453 | |
| 454 | |
| 455 | def zip_directory(path, base_path, archive): |
| 456 | original_dir = os.getcwd() |
| 457 | os.chdir(base_path) |
| 458 | path = path.replace(base_path, "") |
| 459 | if path[0] == os.path.sep: |
| 460 | path = path[1:] |
| 461 | zipf = zipfile.ZipFile(archive, "w", zipfile.ZIP_DEFLATED) |
| 462 | for root, dirs, files in os.walk(path): |
| 463 | for file_ in files: |
| 464 | zipf.write(os.path.join(root, file_)) |
| 465 | zipf.close() |
| 466 | os.chdir(original_dir) |
| 467 | |
| 468 | |
| 469 | def reduce_package_size_issue262(arch): |