pyuca icon indicating copy to clipboard operation
pyuca copied to clipboard

Tests missing from PyPI

Open jtojnar opened this issue 7 years ago • 5 comments

I am trying to package pyuca for NixOS but cannot run tests because the PyPI package lacks them.

See also the Debian thread about the issue: https://lists.debian.org/debian-python/2016/04/msg00074.html

jtojnar avatar Oct 19 '18 21:10 jtojnar

I don't think the tests should ship with the package normally. Is there a workaround I can help with?

jtauber avatar Oct 19 '18 21:10 jtauber

I think you are supposed to include the unit test into the tarball but not into the wheel.

Looking through the packaging docs, I could not find anything mentioning whether to include tests into the tarball. The following StackOverflow answers suggest they are supposed to be included:

https://stackoverflow.com/a/16444257/160386 https://stackoverflow.com/a/32391295/160386 https://stackoverflow.com/a/14437754/160386

Out of top 15 packages on PyPI, only three (pip, awscli and colorama) do not include tests in the tarballs so it seems to be common practice.

jtojnar avatar Oct 19 '18 23:10 jtojnar

yep, makes sense to include them in a source distribution. I just need to work out how to now :-)

jtauber avatar Oct 20 '18 01:10 jtauber

Requests seem to add it through MANIFEST.in: https://github.com/requests/requests/blob/master/MANIFEST.in

jtojnar avatar Oct 20 '18 08:10 jtojnar

I can second that. Unit tests can be used by packagers to test the distro package.

pgajdos avatar Jun 04 '19 08:06 pgajdos