Ronald Oussoren  committed da8a05a

Workaround for a crash when building a bundle that includes
a python package that has a zipfile in its package directory.

The fix to py2app.build_app is rather crude, and as the
comment says it needs to be fixed in modulegraph.zipio instead.
That requires an API change and that in turn requires a review
of all current uses of that API.

Also remove a debug statement.

  • Participants
  • Parent commits a911ab0
  • Tags py2app-0.6.1

Comments (0)

Files changed (3)

File doc/changelog.rst

+- py2app failed to build the bundle when python package contained
+  a zipfile with data.
+  This version solves most of that problem using a rough
+  workaround (the issue is fixed when the filename ends with '.zip').
 - The code that recreates the stub executables when they are
   older than the source code now uses ``xcode-select`` to 
   find the root of SDKs.

File py2app/

                 pth = os.path.join(dname, fname)
                 # Check if we have found a package, exclude those
-                if zipio.isdir(pth):
+                if zipio.isdir(pth) and not pth.endswith('.zip'):
+                    # XXX: the 'and not' part is wrong, need to fix zipio.isdir
                     for p in zipio.listdir(pth):
                         if p.startswith('__init__.') and p[8:] in exts:

File py2app/

-                        print "XXX byte-compiling fn=%s cfile=%s dfile=%s"%(fn, cfile, dfile)
                         compile(fn, cfile, dfile)