[Pythonmac-SIG] Creating environment to build re-distributable app
Ronald Oussoren
ronaldoussoren at mac.com
Tue Oct 12 19:57:39 CEST 2010
On 9 Oct, 2010, at 17:51, Antonio Goméz Soto wrote:
> Hi
>
> I am new to this list. I have a Windows/Linux developed wxPython program
> that I need to create a OSX version for that runs on various OSX platforms.
>
> I modified the app to run on OSX from my source directory, and now it runs
> correctly from there (I use Snow Leopard).
>
> I have forced the OSX supplied Python to run in 32-bit using
> VERSIONER_PYTHON_PREFER_32_BIT=yes, because some of my modules require that,
> and I can't fix those. I use appscript, twisted, and plan to use WebKit,
> which appararently only runs 32-bit.
>
> I am playing with py2app to create a bundle of my app, but I run into
> problems:
>
> 1. py2app seems to work, but the created app seems to run in 64-bit
> even if I do the 'defaults write com.apple.versioner.python Prefer-32-Bit -bool yes'
> command. I get the 'module' object has no attribute TickCount error, which
> according to Google means I am running in 64-bit mode.
That's not entirely unexpected. You can work around this by converting the executable in YourApp.app/Contents/MacOS to a 32-bit only one using the lipo tool.
>
> 2. I read on this list that I should not use the Apple-supplied Python, because
> py2app is setup to NOT include that in the build, and this way I cannot
> distribute my app.
That's not entirely correct. Py2app will indeed not include the Apple-supplied python into the app bundle, but you can redistribute the resulting binary. Your bundle will then require a SL system to run though.
> the posting said to build python2.6 from python.org,
> install all my modules, and work from there.
That should work as well.
>
> 3. I have had bad experience so far building WebKit, because I used macports to
> get git, and that apparently took over my build environment, and that's why
> building WebKit failed. I am afraid macports is getting in the way here too.
>
> So what is the best way to handle this?
Stop using macports?
BTW. The system supplied version of WebKit runs in 64-bit mode, so that shouldn't be a problem. The nightly build (I checked WebKit r69429) also supports x86_64 on SnowLeopard, but not on OSX 10.5 (I wouldn't know why though).
Ronald
>
> Thanks,
> Antonio.
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20101012/b564e5a5/attachment-0001.bin>
More information about the Pythonmac-SIG
mailing list