When trying to figure out how to structure your Python tool for distribution, it can be difficult to get started. This represents a set of writings that I stumbled across, or that others have pointed me to, that I think would use as chapters in a setup.py book.
-
Sharing Your Labor of Love: PyPI Quick and Dirty - https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
A whirlwind overview of some of the history involved in setuptools that paints a picture of why this is all so confusing.
-
How to Package Your Python Code - https://python-packaging.readthedocs.io/en/latest/index.html
A good introduction to packaging with Python. Goes over dependencies, tests, and simple scripts. Doesn't go into a lot of depth, particularly around dependency specification, but it does cover a good breadth of information.
-
Building and Distributing Packages with Setuptools - https://setuptools.readthedocs.io/en/latest/setuptools.html
This is essentially the official
setuptools
documentation. It goes into more depth than a beginner may be looking for, and is missing documentation on custom commands (as of 2016 Nov 1), but is otherwise an excellent resource.
A few sources have been written up to touch on custom subcommands, but they don't contain much depth at all. Still, they provide good starting places.
- Extending setuptools: adding a new command - https://ziade.org/2007/09/30/extending-setuptools-adding-a-new-command/
- Creating Custom Subcommands - https://coderwall.com/p/3q_czg/custom-subcommand-at-setup-py