Description
Context
We are using matplotlib, and we are building our own wheel-distributables built for our systems. Basically, we are not only doing this for matplotlib, but for most python dependencies of our services.
We are using the devpi-builder script (https://github.com/blue-yonder/devpi-builder) to do this, which essentially wraps pip wheel PACKAGE
calls.
Issue
The issue with matplotlib is, that it is set up in a way, that test images end up in the resulting wheels, this leads to wheel sizes of up to 50 MBs, when without these files and directories, wheel sizes would be ~ 6-13 MB.
Note that on Pypi, matplotlib wheels are smaller, i.e. they don't contain these files and directories.
I looked around a little and stumbled over https://github.com/MacPython/matplotlib-wheels/blob/master/rm_test_images.py . I.e. We are not the only ones facing this problem and I assume that somewhere in the manylinux wheel build scripts there probably is a similar logic to remove these files. I'd rather have it the other way around: Don't have these files included by default.
How it should be
Matplotlib's default behaviour should be to not include the test images by default. If there are use cases where such files are needed in a wheel, inclusion should only be opt-in.
So, pip wheel matplotlib
shouldn't produce a wheel that contain the large test images.
PS
Actually I'd prefer wheel releases to be free of any test-suite related stuff. If I need to run unit tests against a built Python wheel, I can take the test suite from the source distribution (as in http://doc.devpi.net/latest/quickstart-releaseprocess.html#devpi-test-testing-an-uploaded-package) if need be. Anyway, for the scope of this issue, I'd be happy if wheel sizes were reasonably small by default.