This tutorial has been updated from Mavericks to Yosemite. I have tested it and it works perfectly.
Install the Xcode Command Line Tools from Apple. Apple now provides an official Command Line Tools for Xcode package that you can install without needing to install Xcode itself. You can install it with xcode-select –install on Mavericks and Yosemite or download it from Apple’s developer site (free registration required) and search for “Command Line Tools”
Install Quartz from here
Install Homebrew and necessary tools:
brew install python3 (this currently installs version 3.4.3_2)
brew install mercurial
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
brew tap homebrew/headonly
brew install smpeg
Clone the pygame repository:
hg clone https://bitbucket.org/pygame/pygame
Copy this file into src, replacing the one there.
That’s it. You can test your install by opening idle3 app located in:
then type: import pygame [hit return]
if there is no error, you were successful.
If this tutorial helped you, please follow me on twitter @dudeslife .