Commits

Ronald Oussoren committed 3ef5364

zipio bugfixes

  • Participants
  • Parent commits e16188e

Comments (0)

Files changed (1)

File py2app/util.py

     try:
         if not dry_run:
             fp_out = open(destination, 'wb')
-            fp_out.write(data)
+            fp_out.write(fp_in.read())
 
     finally:
         fp_in.close()
             if force or newer(mod.filename, cfile):
                 if verbose:
                     print "byte-compiling %s to %s" % (mod.filename, dfile)
+                    
                 if not dry_run:
                     mkpath(os.path.dirname(cfile))
+                    mkpath(os.path.dirname(dfile))
                     suffix = os.path.splitext(mod.filename)[1]
 
                     if suffix in ('.py', '.pyw'):
                         # <mod>.pyo to <mod>.pyc or <mod>.pyc to
                         # <mod>.pyo, but it does seem to work.
                         copy_file(mod.filename, cfile)
+
                     else:
                         raise RuntimeError \
                               ("Don't know how to handle %r" % mod.filename)