def system_specific_zipping(files_dict, zip_file=None, compression=ZIP_DEFLATED, callback=_default_callback_zip):
 if (not zip_file):
  zip_file = tempfile.mkstemp()[1]
 zfile = None
 try:
  zfile = ZipFile(zip_file, 'w', compression)
  for (fi, (dest_path, src_path)) in enumerate(files_dict.iteritems()):
   if callback:
    callback(src_path, fi, len(files_dict))
   ext = os.path.splitext(dest_path)[1]
   if (ext not in not_system_specific_scripts(system='windows')):
    zfile.write(src_path, arcname=dest_path)
   else:
    info = ZipInfo(dest_path)
    info.external_attr = (509 << ((1 - is_osx()) * 16L))
    with open(src_path, 'r') as fh:
     zfile.writestr(info, fh.read())
  zfile.close()
 finally:
  if zfile:
   zfile.close()

def system_specific_zipping ( files_dict , zip_file = None , compression = ZIP_DEFLATED , callback = _default_callback_zip ) : if ( not zip_file ) : zip_file = tempfile . mkstemp ( ) [ 1 ] zfile = None try : zfile = ZipFile ( zip_file , 'w' , compression ) for ( fi , ( dest_path , src_path ) ) in enumerate ( files_dict . iteritems ( ) ) : if callback : callback ( src_path , fi , len ( files_dict ) ) ext = os . path . splitext ( dest_path ) [ 1 ] if ( ext not in not_system_specific_scripts ( system = 'windows' ) ) : zfile . write ( src_path , arcname = dest_path ) else : info = ZipInfo ( dest_path ) info . external_attr = ( 509 << ( ( 1 - is_osx ( ) ) * 16 L ) ) with open ( src_path , 'r' ) as fh : zfile . writestr ( info , fh . read ( ) ) zfile . close ( ) finally : if zfile : zfile . close ( )
zip up files .