Evolving Bits

Wed Sep 02 2009

Snow Leopard Smooth Except Python 32/64 Cocktail

UPDATE: Thanks to the helpful commenters, I found success getting an older Zope instance running on Python 2.4 on Snow Leopard using buildout.

NOTE: This post is for installing Python 2.4 on a brand new Snow Leopard Instance. If upgrading on top of Leopard, you may have to update easy_install, macports, etc. More Googling around may be required.

Though I had to create two buildouts to get this to work -- is there a way to get this into one buildout?

I first tried to create one buildout by combining Florian Schulze's buildout recipe with a standard Zope recipe -- but since initial bootstrap was run by Python 2.5, I couldn't get the Zope instance to use the new Python 2.4. So I first ran a buildout to build Python 2.4 (using OSX-installed Python 2.5), then used that new Python 2.4 to run bootstrap.py on the Zope 2.8.x buildout.

Here's the recipe I used to just build Python 2.4 (requires Florian's buildout, see Alexander Limi's comment below for where to find this):

#extends = src/snowleopard.cfg     # no longer required as Joe mentions below
python-buildout-root = ${buildout:directory}/src
parts -=

prefix = /opt/local

Then I ran a simple Zope 2.8 buildout to see if it would compile (using new Python 2.4 to bootstrap), and it did!

parts =

recipe = plone.recipe.zope2install
url = http://www.zope.org/Products/Zope/

recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = admin:admin
http-address = 8080
debug-mode = on
verbose-security = on

Here is my initial post:

I have to say -- most everything I've installed on a fresh Snow Leopard install has worked flawlessly and swiftly -- except for (the minor inconvenience of) iStat not working. UPDATE: iStat 2.0 is available for Snow Leopard now. There's a new beta of MenuMeters too for Snow Leopard.

There are also nice subtle improvements, see Mac Life's 100 Top Snow Leopard Tips, Trick and Features for improvements to Preview, Expose, Stacks, etc. I've very happy with the upgrade.

Now for the bad news for those like myself who depend on Python 2.4 for Plone, since many versions of Zope require Python 2.4. I also use Python for Django, though that should run fine on Python that shipped with Snow Leopard.

You can read many of the initial details around the web, but here's what I've experienced and have been able to put together:

Plan B's:

Otherwise, to save some headache, I'm wondering about installing a small Linux distro on VMWare as a local mini web-server where I can easily install Python and Zope -- though that's a bit of a pain too.

Luckily I also have my old Leopard in a separate partition (see my Extra life for my MacBook Pro with Snow Leopard and inexpensive hardware blog entry) and can boot that if necessary to work on various Zope/Plone sites (that required Python 2.4) while this is all being sorted out.

Now time to see if I can get 32-bit Python 2.4.6 compiled and installed, while waiting for more patches and information to appear...