-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bob Ippolito wrote: > > On Jul 20, 2006, at 11:43 AM, Kevin Walzer wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Bob Ippolito wrote: >>> >> >>> >>> The other question is why the heck are you using a non-framework build? >> >> Because I'm trying to package an application that builds against X11 >> Tkinter. > > Rebuilding Python entirely seems pretty silly... it's way easier to just > rebuild the _tkinter extension. You could even do it in your py2app > setup.py. Just copy the sources from python. You'll probably need to do > some fiddling in your main script if DISPLAY isn't set though. > > from setuptools import setup, Extension > > extensions = [ > Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], > define_macros=[('WITH_APPINIT', 1)], > include_dirs=['/usr/X11R6/include'], > library_dirs=['/usr/X11R6/lib'], > libraries=['tcl8.4', 'tk8.4', 'X11'], > ), > ] > > setup( > app=['MyApp.py'], > extensions=extensions, > setup_requires=['py2app'], > ) > >
I've already built Python to support X11 Tkinter, so that's not an issue. I finally got the built-in freeze tools to work (as a universal binary) and am running my app inside an application bundle. It uses an AppleScript launcher stub to set the DISPLAY and start up X11.app. There's some jiggering that has to be done with the installation of Tcl/Tk inside the app bundle so the frozen binary sees things correctly, but it's not too hard. After I've polished this up a bit and have released something I will document it somewhere. - -- Kevin Walzer Poetic Code http://www.kevin-walzer.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEwA9VrTC5hIgjqTMRAkl/AJ4hVypthaBiJglH3kb3s9tvKIAwuACfd3Wb jDAiU3uXEoeBVT25Ep0DOQo= =h/WK -----END PGP SIGNATURE----- _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig