Rick Hurst Web Developer in Bristol, UK

Menu

Setting up a plone 3 dev environment on osx leopard

Firstly, to echo something mentioned in one of the articles referenced below – if you just want to install and try out plone on osx leopard – use the installer provided on plone.org. If you want a little more control, or want to get a better understanding of how things work, below describes the steps used to get the development environment I have just set up. I usually get these things wrong when I venture out of the realms of point and click installers, but this was fairly painless. The main purpose for this post is to self-document the process for next time, but hopefully other will find it useful.

1. Install PIL using macports

after installing macports (GUI installer), run this in a terminal :-

$ sudo port install jpeg

This ensures that PIL (Python Imaging Library) is compiled with jpeg support. Thanks to Tom Lazar for the tip

2.check out (from svn) and run this excellent buildout by Florian

(in your home dir – you’ll need svn installed)

$ cd
$ svn co http://svn.plone.org/svn/collective/buildout/python-macosx/
$ cd python-macosx
$ python bootstrap.py
$ sudo bin/buildout

This builds several different versions of python, and creates a virtualenv for the 2.x versions. I tried doing the last step without sudoing, but it wouldn’t have it. As a result, you’ll need an additional step to change the ownership of some of the files/ folders created by the buildout:-

$ cd ../
$ sudo chown -R yourusername python-macosx

3. Activate your python 2.4 virtualenv:-

$ cd python-macosx/python-2.4
$ source bin/activate

Your command prompt should now have (python-2.4) instead of a $. For information on what a virtualenv is and why to use them, see Dan’s article linked below.

4. Follow the instructions for installing ZopeSkel and Plone in Dan Fairs’ article

(^^ scroll down and start at the heading ZopeSkel)

(python-2.4) easy_install ZopeSkel
(python-2.4) paster create -t plone3_buildout p3
(python-2.4) cd p3
(python-2.4) python bootstrap.py
(python-2.4) bin/buildout

5. start zope in foreground mode:-

(python-2.4) bin/instance fg

I think that’s it. One thing to note is that both the python-macosx and plone 3 buildouts died on me at one point (stalled with no errors – wasn’t sure if it was going to come back to life at a later date, so killed the process after about ten minutes of nothingness). In both cases I just tried the buildout again and it worked second time around. Hopefully I haven’t missed anything – please do comment if you think I have, or if you followed the above step by step and had no problems/ problems. At time of writing i’ve only tried creating a default plone site and uploading an image to test the PIL support.

Graham Higgins for the heads-up!