Trolling through the InterWeb, I found this post about a fix to compile the python module from scratch. The post, however, has more instructions than are necessary, so here is my revised procedure:
- Download the source from here.
- Unpack the archive and edit the _mysql.c file to comment out lines 37-39:
// #ifndef uint
// #define uint unsigned int
// #endif - Edit the site.cfg file to set the mysql_config path. For me this was:
mysql_config = /usr/local/mysql/bin/mysql_config - Compile as normal
python setup.cfg config
python setup.cfg build
sudo python setup.cfg install
Now if only someone would make these changes in the port file, then trac installs would be super easy, instead of just easy-ish.
2 comments:
Hi
I've been trying to get MySQLdb working for some time now, unsuccessfully. Problems seem to be concentrating around the fact that mysql, MySQLdb and python don't share a common architecture o newer machines. Could you have a look at the architecture the apps are running as? Or in other words, have a peek at Activity Monitor and see if httpd and mysql are running as intel 64.
Geert
It's better to use setup.py instead of setup.cfg.
Post a Comment