[Pythonmac-SIG] Building plugins with py2app

Ronald Oussoren ronaldoussoren at mac.com
Sun Oct 15 18:26:49 CEST 2006


On Oct 13, 2006, at 7:35 PM, Dethe Elza wrote:


>
>> One thing that you could try:  insert 'import sys; print sys.path'  
>> at the top of __boot__.py (in the Resources directory of the  
>> saver) to see the value of sys.path. That value seems to be wrong.
>
> This is a very good clue.  Here is the sys.path from a working  
> application built with the same version(s) of all the tools:

I've done a clean install of python, py2app, PyObjC and related  
packages and can now reproduce your problem.

I hope I've also fixed the problem in revision 47 of py2app.  It  
turns out the app stub and bundle stub use a slightly different way  
to setup the python environment, which means the right python path  
must be set in the Info.plist for plugins but not for applications.

Setting up the right environment for plugins is also very hard, if  
not impossible to do completely correct: cpython just isn't designed  
for having several completely seperate interpreters in one  
application (and no, Py_NewInterpreter/Py_EndInterpreter don't  
count). Different plugin bundles with py2app will share part of the  
environment, such as having a shared sys.path.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3562 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20061015/ff501f21/attachment.bin 


More information about the Pythonmac-SIG mailing list