Build instructions for building and installing pygame
Apr 9, 2001
-------------------------------------------------------------
pygame is built and installed using the python distutils.

The majority of your work will likely be preparing the
dependencies for pygame. You will obviously need Python 2.0
installed and ready for development work. The only other
requirement is SDL. You should be able to get this compiled
without difficulty. This is all you'll need for the base
pygame installation. There are extra modules you can use
which require other dependencies like Numeric Python and
many of the SDL daughter libraries, like SDL_image and
SDL_ttf, but these extra modules are optional.

If installing under Windows without a compiler, or without
needing any of the pygame dependencies. You can download
the Windows Precompiled Binaries Release. This is a self
installing .EXE file that contains everything you need
(except Python and Numeric Python) to install.

If you would like to compile on windows, but don't want the
effort of preparing all the SDL dependencies, you can
download just the pygame dependencies precompiled. The
config.py script can automatically find the prebuilt
files if they are extracted into the pygame folder.


You control the compilation of pygame with the "Setup"
file. The default Setup file is named "Setup.in". The
file uses basic cross-compiler flags to configure pygame.

The pygame installation also comes with a "config.py"
script. This will create a Setup file based on the different
setting of your platform. This should have little difficulty
building you a proper "Setup" file to compile with.

Once you are reasonably pleased with your "Setup" file, it's
time to build and install with distutils. This is all handled
with the "setup.py" script. Most users will be able to issue
the command "python setup.py install" and distutils will build
and install everything you need.

On windows, distutils will copy the needed dependency DLL's
it finds and place them in the final pygame installation folder.
This should happen automatically. If you get missing DLL errors
when importing the different pygame modules, it is likely python
cannot find the needed dependency libraries. You will want to
hand-copy the needed DLLs to somewhere on your windows path or
into the installed pygame package directory.

On unix, you will likely need to be root to install the library.
The installation needs to create directories in the python
include and site directories. Distutils offers flags to control
where pygame will be installed.

Assuming no errors stopped the install, you are good to go.
Change to the examples directory and start trying things out.

If you do have problems compiling, first check the error. It
is likely a problem with your Setup file. If you get errors
while running the config script, you may have to finish editing
the Setup file by hand. (which is well commented and pretty simple)


Pete Shinners
shredwheat@mediaone.net
