Building MySQL for Python on Mac OS X Leopard (10.5)

Trying to get Django set up on 10.5, I noticed mysql-python needs a small patch to build properly on OS X.

I don’t know if this is required for every python/mysql install, but I know it was needed when building for MySQL 5 insalled from macports, and the system provided python libraries.

Simply fetch the patch, then apply:

patch -u -p0 -i /path/to/_mysql.c.patch

After that, make and make install as usual. That should do it!