========================== Building Pygame2 on Darwin ========================== Building PyGame 2 on Darwin platforms (e.g. Mac OS X) is quite similar to building it in any other Unix-based platform with the following exceptions: Setting the environment ----------------------- You will need the Darwin port of GCC and the Make utility; these programs are automatically installed with XCode/Apple's Developers Tools. These can be found on your second installation CD or on Apple's homepage. Building the dependencies ------------------------- Make sure, you have at least one of the following Python versions installed: * Python 2.5 (bundled with Mac OS X) * Python 2.4, 2.6, 3.1 (http://www.python.org) These versions must be installed as Frameworks: Mac OS 10.5 already comes with Python 2.5 installed as a framework; be careful when installing other versions: either compile them from source (safest option) or download the appropiate precompiled builds, making sure they do a proper Python install under Mac OS X (i.e. as framework). To build anything, you will have to download the following additional source packages: * SDL >= 1.2.10 (http://www.libsdl.org) * SDL_mixer >= 1.2.11 (http://www.libsdl.org/projects/SDL_mixer/) * SDL_ttf >= 2.0.9 (http://www.libsdl.org/projects/SDL_ttf/) * SDL_image >= 1.2.10 (http://www.libsdl.org/projects/SDL_image/) * SDL_gfx >= 2.0.18 (http://www.ferzkopp.net/Software/SDL_gfx-2.0/) * libpng >= 1.2.24 (http://www.libpng.org) * libjpeg >= 6b (http://www.ijg.org/) * freetype >= 2.3.5 (http://www.freetype.org) * portmidi >= 199 (http://portmedia.sourceforge.net/) * OpenAL use one of: * OpenAL11CoreSDK (Aug 2009) http://www.openal.org * openal-soft >= 1.11.753 http://kcat.strangesoft.net/openal.html And you will need the dependency packages for the packages above: * zlib >= 1.2.3 (http://www.zlib.net) * tiff >= 3.8.2 (http://libtiff.org) * libvorbis >= 1.2.0 (http://www.xiph.org/vorbis/) * libogg >= 1.1.3 (http://www.xiph.org/ogg/) * FLAC >= 1.2.1 (http://flac.sourceforge.net) * smpeg >= rev. 370 (http://icculus.org/smpeg/) Where available, the prefered way to install these dependencies is by downloading prebuilt Framework packages: These can be downloaded for all the SDL and SDL-dependant libraries, and they just need to be copied into your System's Library/Framework folders, as instructed in their respective READMEs. The build script will automatically detect them. When Framework packages are not available, the suggested approach is to download the library sources and build them yourself. Optionally, you may want to use a 'ports' package manager for Mac OS X such as MacPorts or Fink to automatically download all dependences. However, be noted that you will need to modify the build scripts/configuration that these programs generate, since they usually compile the downloaded libraries for your installed architecture (either PPC or x86): In order to link a library with a Python module, such library *must* be built as an Universal Binary; linking will fail otherwise. Building Pygame2 ---------------- Now that all dependencies are built and installed, you can proceed to build and install Pygame2 itself. You can either use the python way of installing the package or the make command using the Makefile. Simply type :: python setup.py install for the traditional python way or :: make install for using the Makefile. This will try to perform a default installation with as many features as possible.