[Pythonmac-SIG] Finallt built a universal Binary from py2app 0.4.3

hari jayaram harijay at gmail.com
Fri Oct 16 00:11:14 CEST 2009


Thanks to everyone for your help..
I finally have a truly Universal build with py2app 0.4.3.
I have confirmed that it works on Intel and Power-PC , tiger , leopard
and snow-leopard.

Here is my protocol, I am repeating it because it took me a while to
get all the bits in place
I am building on Leopard -10.5.8 intel mac

1) I was using python.org python 2.6.3
2) wxpython binary build for 2.6 from wxpython.org
3) Installed all my dependent libraries for the new python 2.6.3 ,
reportlab , yaml  and py2app and macholib from subversion (links here
http://www.undefined.org/python/)
4 ) Used the verbose setup.py ( see below)
5)  Ran python setup.py py2app
6) I then had to manually create a directory for the Framework inside
the bundle.app/Contents/Frameworks directory
 mkdir Python.framework
 mkdir Python.framework/Versions
 mkdir Python.framework/Versions/2.6
And copy in the Framework build from my disk into the *.app bundle

cp /Library/Frameworks/Python.framework/Versions/2.6/Python
Python.framework/Versions/2.6/

7) The Resulting app bundle was 103 M uncompressed
8) I used DiskUtility to create a dmg file after I moved the *.app
bundle into a new folder . Used the Disk utility command - create -
disk image from folder . The compressed disk image was 33MB

9) Importantly the  Disk Image ran on both mac cpu platforms and tiger
, leopard and snow-leopard OSes

I am sure this process can be fine-tuned. But thought I would send this along .

Thanks
hari

setup.py:
"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['GridZilla.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True,
 'iconfile': './gzilla_ico_fin.icns',
'semi_standalone':'False',
 'includes': 'wx,reportlab,yaml',
'packages':('wx','reportlab','yaml'),
'site_packages': True}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


More information about the Pythonmac-SIG mailing list