Chapter 5: Writing a Package
A Common Pattern for All Packages
This section provides all the details necessary to create a namespaced package that consists of multiple eggs glued together by a master egg using distutils and setuptools. There are multiple subsections that cover everything you should need to build your project, register it with the Cheeseshop (or any other package index), and upload it for the world to enjoy.
How to Uninstall a Package
This section provides a short rationalization for why there isn’t a built-in
uninstall
command and the current workaround. It’s not mentioned in the
book, but the author is currently working on improving distutils
, and an
uninstall
command is on the agenda. The full details are in the
Adding an Uninstall Function
section of PEP 376.
The Template-Based Approach
After covering the basics of building and distributing a package in the previous section, this section focuses on using templates to reduce the tedium in creating consistent application skeletons. The tool used in this section is Python Paste. There are a couple of short examples using pre-existing templates.
Creating the Package Template
This section covers the process of creating a custom template that describes the structure introduce in the first section.
The rest of the chapter just covers generic aspects of the development cycle, such as version numbering, so I will skip it for this review.
Back to flipping out…