[Pythonmac-SIG] py2app architecture problem and System Python question

Ronald Oussoren ronaldoussoren at mac.com
Mon Jul 26 11:25:21 CEST 2010



On 26 Jul, 2010,at 03:04 AM, Tom MacWright <tom at developmentseed.org> wrote:

Hi all,

It's great to see that there's somewhere that py2app is actually developed and discussed (although it's kind of hard to find this place! the documentation should refer to it or something).
 
The next release will have this list in the information that is published on PyPI.


Anyway, I'm having two large problems with py2app. For reference, I'm running 10.6 and system Python 2.6.1. I've read in one place that, in order to deploy to platforms without Python entirely, one must be using the python.org version of Python instead of system? Is this true? I'm very hesitant to switch from system, because very complex modules (certain C extensions) and version hell are no strangers here.
 
The only way to build application bundles that run on other releases of OSX is to use a non-system install of Python. The reason for that is that py2app will not bundle /usr/bin/python into the application bundles it creates, to avoid legal problems with shipping parts of OSX in an application.


Okay, but the jist of the problem:

When installing my current version of py2app - SVN head, with the absolute head versions of modulegraph, altgraph, and macholib, I was confronted with the problem that the prebuilt binary with the path:

/Library/Python/2.6/site-packages/py2app-0.5-py26.egg/py2app/apptemplate/prebuilt/main-i386
 
That's not good. I'll have to see what I can do about this, /usr/bin/python basicly lies about its architecture: it should clean to be fat3 instead of 'i386'.


was missing. As a result, I tried symlinking main-universal to this location, and the py2app build runs, but with many C warnings and errors (generally refering to CF_ functions being undeclared), and finally ending with the error

lipo: can't figure out the architecture type of: /var/folders/4v/4vu09+KXFWi9RadPbQZPvk+++TI/-Tmp-//ccSC6vWf.out

I think that this is the cause of the current issue that I'm finding with the (fully built, it seems) app bundle that, on other systems, is producing the error that the 'os' module is not found.

So - questions: how does one get this combination of OSX version and Python version to actually work with py2app? Does it? What should be done about this missing main-i386 problem? And how do I test these distributions quickly, as running OSX within VirtualBox isn't supported and I don't have infinite computers to play around with?
 
I use OSX 10.5 Server in a Parallels VM to test cross-release support.


Thanks for any help! I'm looking forward to contributing to the push on development. I'm starting to crack through the code now, and will definitely have budgeted time down the road to spend here.
 

Ronald

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100726/e6080f31/attachment.html>


More information about the Pythonmac-SIG mailing list