On 7-jun-2006, at 18:24, Russell E. Owen wrote:
> >> ... >> What shortcut links? Py2app special-cases the python framework >> because we >> know how it is structured and know what parts must be copied into the >> application to get a working bundle. > > For Tcl/Tk, one may put extension libraries (such as snack) into: > .../Contents/Framework/Tcl.Framework/Resources > That works because Resources is a link. The full path (without > links) is: > .../Contents/Framework/Tcl/Framework/Versions/8.4/Resources > > which would you rather use, especially since the version number may > change?!!! > > Unfortunately one cannot play a similar trick with python. The main > installation of python has various useful shortcut links, but py2app > doesn't copy them. That's because the running application doesn't actually need the link. The easiest way out of this would be to check if a latest version of matplotlib behaves more sensibly, if it does we don't have to look for other ways to get this to work. Either way a recipe would be the best way to solve this: get this into py2app and no other user of matplotlib has to worry about this in the future. > >> The tcl/tk framework is treated specially and that should mean the >> entire >> framework is copied verbatim. That again means that it shouldn't >> be necessary >> to specify that some additional datafiles in that framework should >> be copied >> because they'll be included anyway. > > Tcl/Tk extensions are not auto-copied by py2app. Perhaps that is > because > they live in /Library/Tcl, rather than part of the tcl framework > itself. > On the whole I'm pleased because I have a ton of tcl extensions that I > don't use (I use ActiveTcl -- it saves manually trying to install > snack, > which is a pain to build). > > But the flip side is that one has to figure out where to put tcl > extensions in the bundled app. It's not documented anywhere that I > could > find, so I used trial and error. > > Also, the obvious-but-wrong thing to do is specify the extensions > using > the dataFiles argument with the correct final destination. That > fails if > one relies on the handy shortcut links because Tcl framework is copied > *after* the data files. When the data files are copied, real > directories > are created instead of the necessary links, and that prevents the tcl > framework from being properly copied. > > I really need to spend some time to document this publicly. But where? Do you have a python application that uses additional tcl/tk files? If so it might be worthwhile to teach py2app about this, that is an additional option to the 'py2app' distutils command that can be used to specify the Tcl/Tk extensions that should be copied into the framework. Bob has the last word on this of course, but I wouldn't mind if such functionality would get into py2app (and especially if I don't have to do the work ;-)) What is required to add Tcl/Tk extensions to the application bundle? Ronald > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig