I\'ve been trying to use the zipfile and shutil.make_archive modules to recursively create a zip file of a directory. Both modules work great--exc
You'll need to register a new archive format to do that, since the default ZIP archiver does not support that. Take a look at the meat of the existing ZIP archiver. Make your own archiver that creates directories using that currently-unused dirpath variable. I looked for how to create an empty directory and found this:
zip.writestr(zipfile.ZipInfo('empty/'), '')
With that, you should be able to write the necessary code to make it archive empty directories.