Solved this surprisingly quickly today thanks in part to this post by Basti am. His post was mostly correct but some parts have changed, so I’m going to document how I got it working. Note that this method will miss out PNG, SCRAP, and PORTMIDI support. Good luck getting those working!
- Install Python via Homebrew:
brew install python
- Install pip (because one package manager isn’t enough, right Python?):
- Install numpy with pip:
pip install numpy
- Install the pre-requesites for pygame with Homebrew:
brew install sdl sdl_ttf sdl_image sdl_mixer
- Download the pygame source. It’s one of the top links. Extract it somewhere and go to that directory in a terminal.
- Fix the
Setupfile to point to your Homebrew SDL libraries, not OS X ones (which are missing stuff). Change the lines starting SDL, FONT, IMAGE, and MIXER to read:
SDL = -I/usr/local/include/SDL -L/usr/local/lib -lSDL
FONT = -lSDL_ttf
IMAGE = -lSDL_image
MIXER = -lSDL_mixer
Below those definitions are lines commented out that enable/disable features. Remove the # to uncomment the ones you want.
python setup.py install.