Wheel size is big, but are including unit tests!

Hi, I found that while the wheels for scipy are relatively large (92M installed on disk for my architecture) they also include all unit tests, plus supporting files for those unit tests. Wheels for python modules typically do not contain unit test files. If we would remove all directories named tests/ and their contents, the installed size goes down to 75M which is an 18% improvement.

The drawback is that scipy is so big and popular, so for most people this will just work, but some small but probably non-zero number of people might do stuff such as depend on a test file from scipy in their setups, so there is some risk involved in no longer shipping unit tests.

What do you think?

Hi @mwb, yes we should do this, but it is not clear exactly how to proceed. SciPy will probably follow after NumPy, and NumPy’s discussion is unresolved: Making the numpy test suite separately installable · Issue #26289 · numpy/numpy · GitHub.

Both SciPy and NumPy have the underlying infrastructure in the build system to separate out installation of tests already, hence distributors and anyone building from source are able to achieve this. E.g. on conda-forge there is scipy-tests - conda-forge (6.9MB) split out from https://prefix.dev/channels/conda-forge/packages/scipy (16.3MB).