Installing Mercurial on Snow Leopard

I had trouble getting mercurial 1.3.1 to install (using easy_install) in Snow Leopard today. First I had to re-install Xcode and include the 10.4u SDK, as it was looking for that and it wasn't there.

Even after installing that SDK, it failed to install. Complaining it couldn't find stdarg.h. After some googling of the error messages, I found a workaround:

export CC=gcc-4.0
export CXX=g++-4.0
easy_install -U mercurial

Note that I'm using the Python 2.6.2 build from, which is 32-bit, not the 64-bit Python 2.6.1 that is included with Snow Leopard.

Written on September 7, 2009