Some things that you might want to include in the source distribution, but may not install:
- package license
- test suite
- documentation (possibly a processed form, such as HTML in addition to the source)
- possibly any additional scripts used to create the source distribution
Quite often, this will be the majority or all of what you control in version control and, possibly, several generated files.
The main reason you do this when these files are available online or through version control is because people know that they have a version of documents or tests that match the code in which they work.
If you only post the latest version of documents on the Internet, they may not be suitable for those who, for some reason, should use the older version. And the set of tests at the tip in version control may not be compatible with the version of the code in the source distribution (for example, if it checks the functions added since then). To get the correct version of documents or tests, they will need to comb the version control element, looking for a tag that matches the source distribution (provided that the developers have bothered to mark the tree). Having the files available in the source distribution avoids this problem.
As for people who want to run a test suite, I have a number of my Python modules packaged in various Linux distributions, and sometimes I get error messages related to testing errors in their environment. I also used other people's test suites when I came across an error, and I want to check if the external code runs as the author expects in my environment.
source share