Wednesday, 2 May 2007

Using the free MS C toolkit

The final part of updating Stackless Python to Python 2.5.1 is where I need to build the Windows binaries. Anyone downloading these extracts them over a Python installation and they need to be compatible with any extensions, which requires the use of Visual Studio 2003 or the free MS C toolkit in compiling them. Not having Visual Studio 2003 I had to try the toolkit approach.

After installing all the prerequisites, executing the provided .bat file and then running nant as described, I started the build process. However it failed, unable to find make_buildinfo.lib. I generated this lib file myself using lib /def: x86-temp-release\make_buildinfo.obj. Then I had to do the same for make_versioninfo.lib. After which the release build process was completed successfully. And the debug build process also, although that required editing the file to replace references to 'release'.

For anyone else needing to compile Python or extensions for it compatibly with the released version, I would recommend this approach. It involved a little extra effort, but this is something I expect in this day in age in pretty much any development activity.