[Pythonmac-SIG] py2app and dependencies

Ryan Govostes rgovostes at gmail.com
Sat Oct 25 03:52:07 CEST 2008


I'm having some trouble with py2app messing up package dependencies. I  
built py2app from SVN HEAD a few days ago because the version  
distributed with Apple's Python 2.5 did not appear to support egg  
dependencies.

1. It is failing to find the text_format module of Google's protobuf  
package, despite the fact that it is explicitly imported from  
google.protobuf.message:

> from google.protobuf import text_format

2. Another package is not explicitly imported, so I think I have to  
specify it as a dependency. However, if I add it to the "packages"  
list, I get an error

> ImportError: No module named xyzzy
> > /Users/ryan/trunk/build/bdist.macosx-10.5-i386/egg/modulegraph/ 
> util.py(13)imp_find_module()

This is despite the fact that I can import the package with Python  
interactively.

It also fails if I try making a recipe.


Is there a way to tell py2app what to include explicitly in these  
cases? Or should I do some post-build surgery on the resultant .app?

Regards,
Ryan Govostes


More information about the Pythonmac-SIG mailing list