I'm writing a Python (2.7) script to build and distribute my Mac (10.7) app. I want to zip it up for distribution, but the following code results in an empty zipped app (0 bytes):
from zipfile import ZipFile
with ZipFile(zip_file_dist_path, 'w') as dist_zip:
dist_zip.write(archived_app, os.path.basename(archived_app))
Is it treating it as a file, when I need to treat it as a directory? If I zip it up by walking the app bundle's directory tree and writing each file to the zip, will it unzip with all the proper file system metadata (i.e. will I get back out a proper app)?