conda-forge / pillow-feedstock

A conda-smithy repository for pillow.
BSD 3-Clause "New" or "Revised" License
2 stars 29 forks source link

Included tests make the package large #117

Open ryanvolz opened 2 years ago

ryanvolz commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

Recent builds of the pillow package, which include the tests and test images, weigh in at ~45 MB. Without the tests included, the package occupies less than 1 MB of space. The tests don't get installed into the environment, so the main effect is a bigger download and more space occupied in the package cache. Since nobody is likely to want to run the tests themselves from the packaged tarball, I think that shrinking the package back down to its previous size would be a big benefit (particularly since pillow is a dependency of matplotlib-base, which I assume many people will install).

Conda-build has a --no-copy-test-source-files which would allow the tests to still run in the feedstock and prevent them from ending up in the package, but I don't know if there is a way to use that. Another possible solution could be to create a separate output (e.g. pillow-tests) and run the tests through that. That way they would still be available in a package, but the majority of users would not have to use the extra space.

Installed packages

N/A

Environment info

N/A
h-vetinari commented 2 years ago

Unless there's a simple way to pass arguments to conda-build from cf infrastructure (CC @conda-forge/core), I think the pillow-tests approach would be the most reasonable.

Thanks for the report!

hmaarrfk commented 2 years ago

Yeah, i've been trying to think of a good name of this extra package.

For the conda-package, I gave up on finding a solution: https://github.com/conda-forge/conda-feedstock/blob/main/recipe/meta.yaml#L5

The tests were never run prior to adding that flag.

hmaarrfk commented 2 years ago

my issue wit hthe tests package, is that it may overlap with a real package name from upstream.

I think maybe pillow__tests__ ? or something like that. Fewer chances of collisions.

h-vetinari commented 2 years ago

my issue with the tests package, is that it may overlap with a real package name from upstream.

TBH, I don't think that's an issue. And if upstream ever were to publish something like that, we could build some deprecation for our output. The scipy-feedstock would similarly take scipy-tests.

hmaarrfk commented 2 years ago

Ok. The tests name sounds fine

hmaarrfk commented 2 years ago

I guess we are at the point where a PR would be accepted.