[Pythonmac-SIG] py2app and universal TkAqua

Bob Ippolito bob at redivi.com
Tue Jul 11 22:39:34 CEST 2006

On Jul 6, 2006, at 4:06 PM, Kevin Walzer wrote:

> I have been unable to build the "hello-tk" demo that ships with py2app
> if I am building against a "universal" build of Tcl/Tk.
> Here is my setup:
> from distutils.core import setup
> import py2app
> setup(
>     app=['hello.py'],
>     options=dict(
>         py2app=dict(
>             archs="ppc,i386",
> frameworks=["/Library/Frameworks/Tcl.framework","/Library/ 
> Frameworks/Tk.framework"]
>             )
>         )
>     )

I gave up on that broken universal support in 0.2.x and cleaned up  
what I had in the trunk (0.3). The way it hooks into distutils now  
(via setuptools) is totally different so it needs a change to your  
setup files.

1. remove your existing installation of py2app::

     rm -rf /Library/Frameworks/Python.framework/Versions/2.4/lib/ 
     rm /Library/Frameworks/Python.framework/Versions/2.4/lib/ 

2. install setuptools <http://bob.pythonmac.org/archives/2006/01/17/ 
3. sudo easy_install py2app
4. Change the setup.py::

     # used to be "from distutils.core import setup"
     from setuptools import setup
         # this is actually useless...
         options=dict(py2app=dict(frameworks=['Tcl', 'Tk'])),
         # this is new

Explicitly specifying the Tcl and Tk frameworks is pointless because  
the Tkinter extension either links to them or it doesn't. If it does  
link to them, py2app will find them and include them. If it doesn't  
link to them (or it links to the /System version, for example) then  
it still won't use them even if they are present in the app bundle.

FYI, the repositories for py2app, macholib, bdist_mpkg, altgraph have  
all moved to svn.pythonmac.org, e.g.: http://svn.pythonmac.org/py2app/ 

I didn't bother trying to preserve the history, so don't bother  
trying to svn switch.


More information about the Pythonmac-SIG mailing list