zest.recipe.mysql: building mysql in your buildoutΒΆ

Tags: plone, buildout

At Zest software, we had some problems getting both mysql and mysql's python binding to install reliably on everyone's development machine. The problems were mostly on the mac, as mysql gets installed into different locations by the official mysql distribution, macports and fink. And on the mac, the python binding needs a patch.

One solution: fix the underlying stuff and make mysql and mysql-python a dependency that has to be handled by the OS. Alternative solution: zest.recipe.mysql . Warning: rough edges. It is not a properly documented and tested package as it originally was a quick need-to-get-something-working-now job. But I got a question in twitter about it so here's a quick piece of buildout to get you started if you want to test it:

 [buildout]
 parts =
     mysql
     ...

 [mysql]
 recipe = zest.recipe.mysql
 mysql-url = http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.51a.tar.gz
 mysql-python-url =
   http://switch.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz

 [plone]
 ...
 eggs =
     ...
     ${mysql:eggs}

  • This ought to download and install mysql and mysql-python.
  • Mysql and mysql-python end up in .../parts/mysql.
  • mysql-python is installed as a development egg by buildout.
  • The socket and the database are in .../var/mysql.
  • No documentation, no tests. Did I warn already? We use it on the development machines, not on the server of course.
  • Handy anyway for people with the same problem or looking for similar solutions to like problems.
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):