MCPcopy Create free account
hub / github.com/cztomczak/cefpython / zip_directory

Function zip_directory

tools/build_distrib.py:455–466  ·  view source on GitHub ↗
(path, base_path, archive)

Source from the content-addressed store, hash-verified

453
454
455def 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
469def reduce_package_size_issue262(arch):

Callers 1

pack_directoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected