okay, after a whole lot of research and trying to figure out this problem, i finally got it.
I have a 64bit ppc, but i imagine this is true with any ppc based mac
1.) build mysql community server from source, not a binary or rpm of the source
2.) comment out the duplicate uint declaration in
/usr/include/sys/types.h
so it looks like this
/*typedef unsigned int uint;*/
*just make sure you change it back or at least comment it so you don't
have problems down the line*
3.) since building from source there are no mysqlclient_r.dylib files copy the
mysqlclient.dylib to mysqlclient_r.dylib in /usr/local/mysql/lib/mysql/
because the mysqldb source looks for those names specifically.
cp mysqlclient.dylib mysqlclient_r.dylib
cp mysqlclient.15.dylib mysqlclient_r.15.dylib
cp mysqlclient.15.0.0.dylib mysqlclient_r.15.0.0.dylib
4.) build mysqldb from the source, setup.py build. it will still complain
about mysqlclient_r.dylib being of the incorrect architecture.
5.) for some reason it opts to build with that library assuming an i386
architecture so build it manually by copying the gcc command and removing
the -arch i386 option.
gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch ppc
build/temp.macosx-10.5-ppc-2.5/_mysql.o -L/usr/local/mysql/lib/mysql
-lmysqlclient_r -lz -lm -o build/lib.macosx-10.5-ppc-2.5/_mysql.so
6.) install it, sudo pyton setup.py install.
7.) copy all of the files from MySQL-python-1.2.2/build/lib.macosx-10.5-ppc-2.5
including _mysql.so, _mysql_exceptions.py and those files in the directory
MySQLdb to a directory MySQLdb in your python site-packages directory.
8.) test it out
and email me to tell me if it worked or not at
jason@twinge.org .
_jason