Python snowleopard rescue

Tags: python, buildout

A colleague upgraded his OSX install to snowleopard. Everything you do with python that involves C extension modules breaks. At least with two of the python 2.5 versions on his machine that we tried. Just google for -Wno-long-double.

Snowleopard includes gcc 4.3 which handles warnings differently and complains bitterly about this. But this (from what I found out through google) shadows the real bug that either you may have a something else than MACOSX_DEPLOYMENT_TARGET=10.6 in your PYTHONDIR/lib/pythonx.y/config/Makefile or that there’s no good 64 bit setting. Or something like that.

Solution: build a good python and use that. How? By using a buildout config that builds pythons for you. Hurray to Florian Schulze for adding a separate snowleopard config with the right settings!

Best way to use it is to make your own buildout config and to add an svn:externals like explained in the README. Here’s my buildout.cfg:

[buildout]
extends = src/snowleopard.cfg
python-buildout-root = ${buildout:directory}/src
 
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):