I'm developing a distribution for the Python package I'm writing so I can post it on PyPI. It's my first time working with distutils, setuptools, distribute, pip, setup.py and all that and I'm struggling a bit with a learning curve that's quite a bit steeper than I anticipated :)
I was having a little trouble getting some of my test data files to be
included in the tarball by specifying them in the data_files
parameter in setup.py until I came across a different post here that pointed me
toward the MANIFEST.in
file. Just then I snapped to the notion that what you
include in the tarball/zip (using MANIFEST.in) and what gets installed in a
user's Python environment when they do easy_install or whatever (based on what
you specify in setup.py
) are two very different things; in general there being
a lot more in the tarball than actually gets installed.
This immediately triggered a code-smell for me and the realization that there must be more than one use case for a distribution; I had been fixated on the only one I've really participated in, using easy_install or pip to install a library. And then I realized I was developing work product where I had only a partial understanding of the end-users I was developing for.
So my question is this: "What are the use cases for a Python distribution other than installing it in one's Python environment? Who else am I serving with this distribution and what do they care most about?"
Here are some of the working issues I haven't figured out yet that bear on the answer:
Is it a sensible thing to include everything that's under source control (git) in the source distribution? In the age of github, does anyone download a source distribution to get access to the full project source? Or should I just post a link to my github repo? Won't including everything bloat the distribution and make it take longer to download for folks who just want to install it?
I'm going to host the documentation on readthedocs.org. Does it make any sense for me to include HTML versions of the docs in the source distribution?
Does anyone use
python setup.py test
to run tests on a source distribution? If so, what role are they in and what situation are they in? I don't know if I should bother with making that work and if I do, who to make it work for.