On 28/09/13 19:03, Paul Colomiets wrote:
> Hi Juan,
> 
> On Sat, Sep 28, 2013 at 8:40 PM, "Juan J. Martínez" <[email protected]> wrote:
>> I didn't like fiddling with LD_* because some Linux distributions may
>> not allow using them for security reasons (ie. Fedora with selinux
>> enabled), restricting what ldconfig will do.
>>
> 
> AFAIK, they restrict if LD_* used by ldconfig. But not how we use it
> with ctypes (dlopen). So:

I think you're right.

> 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)
> 
>> If I had to support this, I would use a pyglet.options entry with a callable:
> 
> I would say we should support loading libraries from project directory
> out of the box, i.e. without any configuration.
> 
> The complexity is to find out what "project directory" is. It may be
> directory where sys.executable is, in case of running py2exe or
> cx_freeze, or it may be a directory of the main script, or a workdir.
> Maybe just search all of the above and their "lib", "lib/x86",
> "lib/x64" subdirectories. Probably we could also use some py2exe or
> cx_freeze hooks.
> 

We can use pyglet.resource.get_script_home() as it will take into
account all the py2exe and cx_freeze cases. I like searching in current
script dir and lib directories (lib/x86 and lib/x64 doesn't make sense
because... ARM etc hehe).

Still like the idea of at least disabling this behaviour from
pyglet.options so I'll add it.

I can implement this. I'll submit a bug report with a patch so anybody
can review it before gets into the repo.

Thanks for your help Paul!

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