6 things I learned about setuptools
July 5th, 2009
While building pyvcs and django-vcs over 4th of July weekend with Alex Gaynor [ announcement ], 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 internals of setuptools from other setups. This works well at about 90% of the case. There are a few gotchas, however.
find_packages('directory')will look underdirectoryfor a list of python modules to install. For our applications, we actually just wantedfind_packages()- 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
zip_safeproperty toFalse. - The setup.py commands of
registerorsdist uploaddon’t actually check that your project installs. For that, its likely better to use a virtualenv and test the installation. package_datais used to includes docs (or in our case, templates) with the project.
This serves mostly as future reference for me, but hopefully helps someone else navigating the maze that is setuptools.
Comments are disabled. If that bothers you, please contact me on twitter at @justinlilly and let me know.