Hi Juan, On Sat, Sep 28, 2013 at 9:57 PM, "Juan J. Martínez" <[email protected]> wrote: > On 28/09/13 19:03, Paul Colomiets wrote: >> [...] >> AFAIK, they restrict if LD_* used by ldconfig. But not how we use it >> with ctypes (dlopen). So: >> >> directories.extend(os.environ['LD_LIBRARY_PATH'].split(':')) >> >> .. still work (that's at >> https://code.google.com/p/pyglet/source/browse/pyglet/lib.py#268) >> > > Ah, that's going to be harder than I though. That code is only used in > Linux as a fallback mechanism and the default ctypes.util.find_library > won't check LD_LIBRARY_PATH (at least not in my system). > > I'm certain it will work in Mac, but it won't work in Linux if library > is installed in the system. >
AFAICS, The whole point of the find_library is to find system library and find out the exact version of it (e.g. libm.so.6). Given we don't want to have multiple versions and given that the whole intention is to *override* system libraries, I think it's safe to just use CDLL(dir + 'libname.so') before trying to find_library. -- Paul -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
