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

Thomas Caswell tcaswell at gmail.com
Mon Apr 25 14:58:16 EDT 2016


My only thought is to just not build the tk backend, shipping wheels that
are known to segfault is no good.

Is there any way to (optionally) do a bit of compilation on installation of
a binary wheel?

Tom

On Mon, Apr 25, 2016 at 1:38 PM Matthew Brett <matthew.brett at gmail.com>
wrote:

> Hi,
>
> I am building matplotlib manylinux wheels:
>
>
> https://github.com/matthew-brett/manylinux-builds/blob/master/build_matplotlibs.sh
>
> The problem is, what to do about the default matplotlib tk optional
> dependency?
>
> Normally, matplotlib builds against the installed system tk libs :
> https://github.com/matplotlib/matplotlib/blob/master/setupext.py#L1522
>
> When building a manylinux wheel, we can only build against the tk libs
> / headers on the manylinux docker image, by doing `yum install -y
> tk-devel` before building.
>
> This means that the tk that matplotlib is built against, is different
> from the one that Python uses with `import Tkinter`.  I suppose that
> is what causes the following, when building matplotlib with tk-devel
> installed:
>
> >>> import matplotlib
> >>> matplotlib.get_backend()
> u'TkAgg'
> >>> import matplotlib.pyplot as plt
> >>> plt.plot(range(10))
> [<matplotlib.lines.Line2D object at 0x7f2a8e4b4390>]
> >>> plt.show()
> Segmentation fault
>
> I don't immediately see a good way to deal with this.  Any thoughts?
>
> Cheers,
>
> Matthew
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/wheel-builders/attachments/20160425/f85c59eb/attachment.html>


More information about the Wheel-builders mailing list