[Pythonmac-SIG] py2app import framework

Christopher Barker Chris.Barker at noaa.gov
Wed Aug 27 21:53:29 CEST 2008


beau wrote:
> I am trying to do a framework build to import tk and python2.5 for my
> application bundle with py2app

> """
> This is a setup.py script generated by py2applet
> 
> Usage:
>     python setup.py py2app
> """
> 
> import objc, AppKit, Foundation, os
> 
> from setuptools import setup
> 
> objc.loadBundle('Tcl.framework', globals(),
> bundle_path='/Library/Frameworks/Tcl.framework')
> 
> APP = ['appName.py']
> DATA_FILES = []
> OPTIONS = {'argv_emulation': True}
> 
> setup(
>     app=APP,
>     data_files=DATA_FILES,
>     options={'py2app': OPTIONS},
>     setup_requires=['Tcl.framework'],
> )

Is that the exact script you got from py2applet? All that 
objc.loadbundle etc should not be required.

Did you try the very simplest setup.py first? A tk app should just built 
automagically.


> do I have to add anything to the appName.py to inorder to build these
> and execute them on other machines that maynot have tk or have an
> earlier version of python installed? 

what python are you using? if you are using the Framework build from 
python.org, then it should all "just work". If you are using the Apple 
supplied python, then py2app will not include python itself.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list