- Download the Python (2.5) source distribution from http://www.python.org/
- Build Python from sources with MSVC 2005 Express, in both Debug and Release configurations. For this, go to the directory PCBuild in the source distribution and double click on the .sln file (Visual Studio will ask to convert it, since Python 2.5 was built on Windows with MSVC 2003). Select Debug and build solution. Then the same for Release.
- Some libraries fail to build - this is normal. These are usually bindings to extra thing you have to install (Tk addons, bz compression, Berkley DB libs, etc). Python works fine without them.
- Now, following the documentation instructions, I copied the \PC\example_nt directory, opened the solution contained in it, modified the Include and Linker Library directories path back to the source distribution, and built the solution.
- example.pyd is created, and can be loaded and used by the Python interpreter.
Creating Python extension modules in C
For comments, please send me an email.