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
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.
However, for me the patch would be helpful as is.
--
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.