Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-04 Thread Kyle Sluder
On Mon, Oct 4, 2010 at 11:11 AM, Greg Parker wrote: > On Oct 2, 2010, at 6:54 PM, Kyle Sluder wrote: > > Maybe weak linking can help here. If you weak link the Python library and > call dlopen early on in your program's lifetime with the appropriate path, I > think dyld will populate all the weak

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-04 Thread Greg Parker
On Oct 2, 2010, at 6:54 PM, Kyle Sluder wrote: > Maybe weak linking can help here. If you weak link the Python library and > call dlopen early on in your program's lifetime with the appropriate path, I > think dyld will populate all the weak linked functions it finds. No, weak linking doesn't do

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Kurt Sutter
On 3. Oct 2010, at 3:54, Kyle Sluder wrote: > On Oct 2, 2010, at 3:10 AM, Kurt Sutter wrote: > >> Sorry to be obtuse, but it may be that I am overlooking something. >> Presently, we have calls such as >> >> n = PyNumber_Float(obj) >> s = PyString_AsString(obj) >> >> I understand that I would

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Kyle Sluder
On Oct 2, 2010, at 3:10 AM, Kurt Sutter wrote: > Sorry to be obtuse, but it may be that I am overlooking something. Presently, > we have calls such as > > n = PyNumber_Float(obj) > s = PyString_AsString(obj) > > I understand that I would need to generate #defines for all those names, such > a

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Gwynne Raskind
On Oct 2, 2010, at 7:20 AM, Ken Thomases wrote: >> Sorry to be obtuse, but it may be that I am overlooking something. >> Presently, we have calls such as >> >> n = PyNumber_Float(obj) >> s = PyString_AsString(obj) >> >> I understand that I would need to generate #defines for all those names, >>

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Ken Thomases
On Oct 2, 2010, at 5:10 AM, Kurt Sutter wrote: > Sorry to be obtuse, but it may be that I am overlooking something. Presently, > we have calls such as > > n = PyNumber_Float(obj) > s = PyString_AsString(obj) > > I understand that I would need to generate #defines for all those names, such > as

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Kurt Sutter
On 2 Oct 2010, at 11:07, Ken Thomases wrote: > On Oct 2, 2010, at 3:48 AM, Kurt Sutter wrote: > >> Yes, that is an option I have considered. But, if I understand this >> correctly, it would mean resolving some hundred symbols through dlsym and >> providing a glue function for each of them. Rig

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Ken Thomases
On Oct 2, 2010, at 3:48 AM, Kurt Sutter wrote: > Yes, that is an option I have considered. But, if I understand this > correctly, it would mean resolving some hundred symbols through dlsym and > providing a glue function for each of them. Right? I don't see the need for a glue function. You do

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Kurt Sutter
Ken Yes, that is an option I have considered. But, if I understand this correctly, it would mean resolving some hundred symbols through dlsym and providing a glue function for each of them. Right? (One other option I have just discovered is to place a symlink file in ~/lib, which seems to be i

Re: info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-02 Thread Ken Thomases
On Oct 1, 2010, at 11:49 PM, Kurt Sutter wrote: > In our application, the user should be able to change the version of a > library that the application is linked to. Don't link to the library/framework. Dynamically load it (dlopen, dlsym, etc.), instead. Granted, this is a pain in the neck co

info.plist with DYLD_LIBRARY_PATH = ~/test

2010-10-01 Thread Kurt Sutter
In our application, the user should be able to change the version of a library that the application is linked to. Specifically, our application links to the Python library. However, some users want to use the Python at /System/Library/Frameworks/Python.framework/Versions/2.6, while others may wa