The current vcrpy sdist on PyPI includes __pycache__ dirs and compiled files which causes tests to fail when running tests via setup.py test
import file mismatch:
imported module 'test_persist' has this __file__ attribute:
/Users/imalison/Projects/vcrpy/tests/unit/test_persist.py
which is not the same as the test file we want to collect:
/usr/home/user/repos/freebsd/ports/devel/py-vcrpy/work/vcrpy-1.7.4/tests/unit/test_persist.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
This change recursively excludes these directories and files from future source distributions
This change should make new tarballs uploaded to pypi include various
nice pieces:
- The README
- The LICENSE
- The tests
The text of the license actually specifies that the full text must be
distributed with all copies of the software. So, you need it to be in
compliance with the MIT license.
The README is just nice to have, and the tests are particularly nice for
my use case. I am packaging vcrpy for inclusion in the Fedora linux
distribution and:
- We like to use the tarball from pypi because it is the same source
distribution that everyone else is using.
- We like to run the tests before we build the rpm in our build system
to make sure nothing crazy is going on.
Of course, we can use the tarball for the source and then do a second
step to clone the source and get the tests. But, this is more work than
we like if we can just get the tests added to the tarball. Other
distributions (like Debian) like this too.