I'm starting out on another TurboGears project - this time using the TG 1.1-destined choices for templating and database access - Genshi and SQLAlchemy. TG's use of setuptools really makes life easy...

Okay, not setuptools related, but TG comes with a -s option to tg-admin quickstart to use SQLAlchemy instead of the TG 1.0 default mapper of SQLObject.

That pretty much only makes changes to model.py relative to SQLObject.

Since I'm using virtual-python, my global SQLAlchemy install wasn't in the virtual-python install's site packages. I could have just symlinked it in, but then I figured I should make sure that SQLAlchemy is indicated as a dependency to my program (I was a little surprised TG didn't do that already). To setup.py I go.

The install_requires already contains TurboGears >= 1.0b1, and I add SQLAlchemy >= 0.2.8. While I'm there, I add in Genshi >= 0.3.1. I then went on a tangeant, and later ran python setup.py develop to install a link to my development copy of my project. And off setuptools goes and downloads and install SQLAlchemy and Genshi.

The TurboGears CogBin is a brilliant idea. It grabs the TurboGears-related modules from The Cheese Shop, the definitive collection of Python modules. I knew I needed one of those WYSI(almost)WYG HTML editors, and TurboTinyMCE looked like a good bet. Add TurboTinyMCE >= 1.0.3 to setup.py, and next time I deploy my package, it automatically fetches that and installs it.

By utilising the Cheese Shop and not being its own island, the TurboGears CogBin means installing packages is trivial via setuptools, which already knows the Cheese Shop.

Once multi-application TG is a reality, an entire web site might just be a bunch of dependency listings in a setup.py file and some configuration.