[Wheel-builders] [Matplotlib-devel] Manylinux external library test case - matplotlib, tk

Leonardo Rochael Almeida leorochael at gmail.com
Tue May 10 18:09:13 EDT 2016


On 10 May 2016 at 18:52, Matthew Brett <matthew.brett at gmail.com> wrote:

> On Tue, May 10, 2016 at 5:26 PM, Matthew Brett <matthew.brett at gmail.com>
> wrote:
> >> [...]
> >>
> >> This would probably look like:
> >>
> >> _tkagg.so has a DT_NEEDED entry naming tkinter.so (or whatever Python
> calls
> >> this module)
> >>
> >> Before loading _tkagg.so, we use Python level introspection figure out
> where
> >> tkinter.so lives
> >>
> >> We add its directory to LD_LIBRARY_PATH
> >>
> >> we import _tkagg.so
> >>
> >> We take its directory back off of LD_LIBRARY_PATH
> >>
> >> Very weird, but I can't see why it wouldn't work, and probably more
> reliable
> >> than anything where we try to reimplement the dynamic loader's search
> logic
> >> ourselves.
> >
> > Nice - yes - it does work in a first-pass test - I'll look into
> automating that.
>
> Ah - except I do not believe it is possible to change the linker path
> for Python modules, within the Python process:
>
> http://www.gossamer-threads.com/lists/python/python/393770#393770


I was about to point that out...

On the other hand, if there is a `Tkinter` module that Python can import,
just importing it will make the symbols needed the `_tkagg` module
available, assuming Python calls `dlopen()` on import with RTLD_GLOBAL[1].

[1] http://man7.org/linux/man-pages/man3/dlopen.3.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/wheel-builders/attachments/20160510/5ec91db9/attachment.html>


More information about the Wheel-builders mailing list