On 28/09/13 21:19, Paul Colomiets wrote:
> Hi Juan,
> 
> On Sat, Sep 28, 2013 at 10:40 PM, "Juan J. Martínez" <[email protected]> wrote:
>> Please see the following issue (has the patch):
>>
>> http://code.google.com/p/pyglet/issues/detail?id=671
>>
>> It's explained there. Let me know if I've done anything stupid but this
>> should allow us to load libraries from the same directory the script is
>> run *or* a subdirectory called "lib".
>>
> 
> The patch is probably ok. There are two small issues though:
> 
> 1. The original code style:
> 
>   a) `".so" in name` may catch ".sock" which is a bad thing, I'd use
> `".so." in name or name.endswith(".so")` or a regexp
> 
>   b) similarly regexp "lib(.*)\.so" matches "librarian.sock", should
> probably use "lib(.*)\.so(?:$|\.)"
> 
>   c) keeping same dictionary for cache by library name and by file
> name seems ugly

OK, I can fix a and b. c is not a big deal, but I'll look at it too.

> 2. Libraries that has dependencies on other libraries can use
> dependencies from system paths. So LD_LIBRARY_PATH should probably be
> populated anyway.
> 
> Even if #2 won't work with selinux, it will work for most cases I
> think. Does Fedora use selinux by default on the desktop? Selinux
> problem can probably be fixed by preloading all the dependencies with
> CDLL using RTLD_GLOBAL flag, but I'm not sure that it works and how to
> do that automatically.

selinux is enabled by default in Fedora (even in desktop), but I don't
think that's the problem.

The problem is that in Linux ctypes.util.find_library won't check
LD_LIBRARY_PATH at all and ldconfig is ignoring it also (AFAIK is
supposed to be a bad idea, the trend is to not support it anymore).

I'll fix the regex and I think the patch is a good and will enable us to
do what we want without changing the code too much.

Thanks again for your help.

Regards,

Juan

-- 
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/

-- 
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.

Reply via email to