6 things I learned about setuptools
While building pyvcs and django-vcs over 4th of July weekend with Alex Gaynor1, there were a few interesting lessons learned, mostly revolving around how setuptools works. As Jacob mentions in his post on buildout, you mostly have to cobble together the usage of setuptools from other setups. This works well at about 90% of the case. There are a few gotchas, however.
- findpackages('directory') will look under directory for a list of python modules to install. For our applications, we actually just wanted findpackages()
- You can't easily specify multiple authors for a project. We settled on author = "First Author, Second Author"
- Its a good idea to version target your requirements. Don't require "pyvcs", require "pyvcs>=0.1".
- If your project contains django templates, set the zipsafe property to False.
- The
register
orsdist upload
setup.py commands actually check that your project installs. For that, its likely better to use a virtualenv and test the installation. - packagedata is used to includes docs (or in our case, templates) with the project.