[Distutils] py2app and eggs part deux

Bob Ippolito bob at redivi.com
Wed Jul 13 05:04:37 CEST 2005

On Jul 12, 2005, at 4:51 PM, Kevin Dangoor wrote:

> I really want to use eggs, but I *have* to use py2app. Basically, the
> issues that I see are:
> 1) modulegraph needs to know about eggs so that it can track down the
> dependencies of things in the eggs
> 2) the eggs should either be put into the site-packages.zip file in
> the bundle in "basket" form, or should be tossed directly into the
> site-packages directory.
> For the first point, I'm curious if modulegraph already knows about
> zip packages. I didn't see anything in the code that immediately
> jumped out at me saying "hey! this package is zipped up". What I had
> seen was that the contents of eggs were just being ignored. If module
> graph does have some knowledge about zip libraries, that would
> probably translate well.
> As for #2, the ideal would probably be to put everything in basket
> form in site-packages.zip. I figure that by opening up the eggs and
> only pulling out the referenced parts, the overall app can be smaller.
> Any package resources need to get in there, though. For expedience,
> though, I'm quite find with a little bit larger app that has the .egg
> files stored directly in site-packages with a .pth file.
> Any commentary on the difficulty involved here? (Bob?)

The most expedient option would be to specify the eggs and a pth as  
resources (or data_files) manually.

Second to that, you could make sure all the eggs are unzipped and on  
sys.path when the setup.py is running (this doesn't solve the  
resources thing, but modulegraph doesn't do that anyway).

As far as fixing the implementation, I don't know.. I don't really  
have time to work on open source Python stuff right now.  Patches  
accepted, of course.


More information about the Distutils-SIG mailing list