[Pythonmac-SIG] py2app question: path to included python
Russell E Owen
rowen at u.washington.edu
Wed Jun 7 21:47:49 CEST 2006
At 9:26 PM +0200 2006-06-07, Ronald Oussoren wrote:
>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:
>>That works because Resources is a link. The full path (without links) is:
>>which would you rather use, especially since the version number may
>>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.
>...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 ;-))
Yes indeed. It uses the snack sound library (I wish there was a
cross-platform python sound library I could use instead). But I'm
sure other users of Tkinter have other extensions they like.
>What is required to add Tcl/Tk extensions to the application bundle?
Tcl additions are found in /Library/Tcl/ and are often folders of
files. These need to be copied to:
I found it by asking tcl for the relevant path. As I recall, tcl only
looks in one directory for extensions (though I hope I'm wrong; that
seems hard to believe). I certainly tried to find a more convenient
location, but no luck so far.
As I mentioned before, if one uses the dataFiles argument, then one
must not specify the final destination, as this messes up copying of
Tcl.framework (due to a directory being created that should be a
link). Instead, I first copy the files to a simple location and then
move it. That issue *might* be avoided by specifying the full
non-linked path to the destination, e.g.:
but that sounds painful.
So built-in support would certainly be more convenient!
More information about the Pythonmac-SIG