Quantcast
Viewing all articles
Browse latest Browse all 3535

Max M: Installing ZMySQLDA in Zope using buildout on Ubuntu and perhaps Debian in general

Another note to future self. This is how I did it.

libmysql++-dev

To make Zope work with Mysql I needed to compile the database adapter. For this I needed the mysql dev libraries. On Ubuntu that is done like this:
aptitude install libmysql++-dev

MySQL-Python


For ZMySQLDA to work I needed the plain Python MySQL-Python library installed and compiled.

Luckily the MySQL-Python package is distributed as an egg, so it can just be added to buildout.cfg
eggs =
... other packages
MySQL-Python
Buildout will then download, compile and install the package automatically.


ZMySQLDA

ZMySQLDA is old. Latest release 2.0.8 is from 2001. But that is just because it is stable. No worry.

When I tried to install it with by adding it in the buildout.cfg:
urls = http://www.zope.org/Members/adustman/Products/ZMySQLDA/2.0.8/ZMySQLDA-2.0.8.tar.gz
It made a small tarbomb and put itself inside a directory structure like:
lib/python/Products/ZMySQLDA
And Zope was not be able to find it.

Buildout to the rescue again. Radim Novotny has made a buildout recipe for doing it right:
http://pypi.python.org/pypi/cns.recipe.zmysqlda/
So all I needed was a few additions to the buildout.cfg

[buildout]
parts =
...
zmysqlda
and
[zmysqlda]
recipe = cns.recipe.zmysqlda
target = ${buildout:directory}/products

And then I was good to go.

Viewing all articles
Browse latest Browse all 3535

Trending Articles