[Pythonmac-SIG] py2app/PyQt/64-bit/Mach-O

Kevin Walzer kw at codebykevin.com
Mon Dec 28 04:38:55 CET 2009


On 12/27/09 2:25 PM, Marc-Antoine Parent wrote:
> I also ran into this recently.
> I was trying to wrap a PyQt application on Snow Leopard, and I wanted a 64-bit application as a result.
>
> The first issue you ran into involves macholib, and is easy enough to correct; here is the patch file.
>
> Also, py2app builds a 32-bit bootstrap executable in dist/ApplicationName.app/Contents/MacOS/ApplicationName ; so it will still start in 32 bits. To correct that, the py2app templates have to be rebuilt. Code patch below, and then do the following:
>
> cd {sowewhere}/py2app/py2app/apptemplate
> rm prebuilt/main
> python setup.py build
> cd ../bundletemplate
> rm prebuilt/main
> python setup.py build
>
> Note that the patch involves bumping the minimum system version from 10.3 to 10.4; Ideally this should be parametrized. Another issue that requires more thought, that Kevin also identified, is the argvemulation not working in 64 bits. My patch just hides the failure at this point, something better has to be done.
>

Marc-Antoine,

Thank you for these patches.

I'm sorry to report that even after applying these patches and 
re-installing py2app and macholib, my four-way Tkinter application won't 
build with py2app. I get this error in py2app:

File "build/bdist.macosx-10.5-universal/egg/macholib/MachO.py", line 
295, in synchronize_size
     raise ValueError("New Mach-O header is too large to relocate")
ValueError: New Mach-O header is too large to relocate
 > 
/Users/kevin/Desktop/phynchronicity/build/bdist.macosx-10.5-universal/egg/macholib/MachO.py(295)synchronize_size()
-> raise ValueError("New Mach-O header is too large to relocate")

I've seen this before, and am not sure how to fix it.

--Kevin
-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the Pythonmac-SIG mailing list