[Pythonmac-SIG] py2app x86_64 patch and question

Ronald Oussoren ronaldoussoren at mac.com
Thu Jul 29 15:29:41 CEST 2010


On 29 Jul, 2010, at 14:30, danodonovan wrote:

> 
> Hi Ronald, I hope the Euro Python conference went well. I think py2app is a
> great idea, thanks for your hard work.
> 
> I've been using py2app 0.5.2 (from SVN) to build a non-native X11 python
> app. I tweaked setup.py in testing/apptemplate to include:
> 
>    {
>        'name': 'main-x86_64',
>        'target': '10.5',
>        'cflags': '-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64',
>        'cc': 'gcc-4.2',
>    },

I'll add this and the other 3 single-architecture variants in the next release.

> 
> as my non-native X11 python isn't fat (or intel etc). Distutils builds
> everything in build/bdist.macosx-10.6-x86_64 (and so I needed a main-x86_64
> prebuilt exe)
> 
> This works fine for me (and I imagine could be done for main-i386 as someone
> else mentioned). But leads to my question:
> 
> For whatever reason, py2app or distutils isn't including my C .so files in
> the dist/app - could this be because they reside in
> build/bdist.macosx-10.6-x86_64 rather than build/bdist.macosx-10.6-intel
> etc. as would be expected in a native build? Is there any way to force
> py2app to include the binaries from here? (or is this a distutils issue?)

py2app should not cause about the architecture string. You'll probably see warnings in the py2app output of it not being able to find your extension when building the module graph (those should be burried in the rather verbose output of py2app, another thing that should be fixed in the future).

Do you have a setup.py where you build extensions and run py2app as well?  If so, could you try creating a setup.cfg file with this contents:

    [build_ext]
    inplace = 1

That instructes build_ext to copy extensions into the source tree, and I wonder if that would solve your problem.  If that works it is merely a workaround, py2app and/or modulegraph should then be fixed to work when this setting is not present.

Ronald
> 
> Thanks for your help, 
> 
> Dan
> 
> 
> -- 
> View this message in context: http://old.nabble.com/py2app-x86_64-patch-and-question-tp29295418p29295418.html
> Sent from the Python - pythonmac-sig mailing list archive at Nabble.com.
> 
> _______________________________________________
> 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/20100729/b36e5b5d/attachment.bin>


More information about the Pythonmac-SIG mailing list