I tested building this module under windows 2000 with python 2.6 and with python 2.5 
both in normal windows location c:/pythonXX and also tested with python2.5 
installed under C:/Program Files/Python.

Command to build extension:

python setup.py build_ext -c mingw32

then move the _example.pyd file from build/lib into the current dir...

Then from python can use with 
>>> import example
>>> example.foo


For linux its even easier:
python setup.py build_ext

then move the _example.so file from build into the current dir...