Getting pymunk to work under OS X
The Python binding for the brilliant Chimpunk physics library, pymunk is a bit of a pain to get set up on OS X. You need the source for Chipmunk to spit out a dylib, or dynamic library, but the setup.py bundled with pymunk bungles the compilation. With a lot of trial and error, I managed to compile the source using gcc. The recommended cmake didn’t work either. For future reference, here is how you compile Chipmunk on OS X:
gcc -O3 -std=gnu99 -fno-common -ffast-math -c *.c
gcc -dynamiclib -o libChipmunk.dylib *.o
Enjoy!