[Python-Dev] Build Notes for building trunk with Visual Studio 2008 Express Edition

Christian Heimes lists at cheimes.de
Fri Nov 23 16:59:32 CET 2007


Paul Moore wrote:
> Install Visual C++ 2008 Express Edition. Only select Silverlight from
> the options (no documentation or SQL Server - Silverlight probably
> isn't actually needed either).
> I already had the Platform SDK installed, but did nothing to tell VS
> about it, or to integrate it. I doubt this is relevant.

Even the VS 2008 Express Edition comes with the necessary bits and
pieces to build everything. I don't think you need an extra installation
of the platform SDK anymore. It should only be required for developers
with the Express Edition who want to build a 64bit build.

> Start VC.
> Open project PCBuild9\pcbuild.sln
> Message "Solution Folders are not supported in this version of Visual
> Studio. Solution folder 'Solution Items' will be displayed as
> unavailable." Select OK.

That's harmless but disappointing. The solution folder contains the
README.txt for quick access.

> Select the release build (Build > Configuration Manager)
> 
> Right click pythoncore > Build
>   make_buildinfo - succeeded 1 warning (unlink vs _unlink)
>   make_versioninfo - succeeded
>   pythoncore - I hit an error in ast.c so I needed to svn up (to
> 59136). Succeeded.
> 
> Right click python > Build. Succeeded.
> Right click pythonw > Build. Succeeded.
> Right click _socket > Build. Succeeded.
> Right click _testcapi > Build. Succeeded.
> Right click pyexpat > Build. Succeeded.
> Right click select > Build. Succeeded.
> Right click unicodedata > Build. Succeeded.
> Right click winsound > Build. Succeeded.

Why are you building the projects step by step? "Build solution" or F6
builds everything in the right order.

> bz2
> ---
> 
> The include dir is a macro, and I can't work out how to override the
> default (which is bzip2-1.0.3). So I stuck to 1.0.3 and exported it
> from Python svn, as per the instructions.

You can alter the user macros from the Property Manager. It's a bit
hidden in the GUI under View -> Other Windows -> Property Manager. In
the property manager pick a random project and configuration and edit
the pyproject property file. Almost every project inherits settings
directly or indirectly from pyproject. The macros are under "User Macros".
You have to safe the property file all by yourself. My Beta 2 doesn't
save the property file with "Save All".

> _sqlite3
> --------
> 
> Again, couldn't work out how to change the macro, so I stuck with the
> external from svn (sqlite-source-3.3.4).
> 
> The pre-link step failed with an error about not finding TCL. I edited
> the prelink step to include a /DNO_TCL flag on the cl command. There
> may be a better approach - I don't know if not having TCL is an issue
> for Python's use of sqlite.

Hey, that's a good idea. The TCL error isn't a critical error although
VS reports it so.

> _tkinter and _bsddb
> -------------------
> 
> The instructions suggest using VS 2003 to build the dependencies. I
> don't have VS 2003 and don't have the time at the moment to
> investigate further.

bsddb is automatically build by a build step. But you have to convert
the project files in build_win32 to VS 2008 first. Simply open the
solution file and let VS convert the projects.

tcl/tk isn't integrated in the new build process yet. I think we have to
update the dependencies first.

> _ssl
> ----
> 
> Christian has been making changes to allow this to build without Perl,
> so I gave it a try. I used openssl 0.9.8g, which I extracted to the
> build directory (I noticed afterwards that this is the same version as
> in Python svn, so I could have used the svn external!)
> 
> I needed to download nasm (nasm.sf.net) version 2.00rc1, and rename
> nasm.exe to nasmw.exe and put it on my PATH.
> 
> Build succeeded, no issues.

You still need Perl if you are using an official download of openssl.
I've added the pre-build assembly and makefiles in the svn external at
svn.python.org

Christian


More information about the Python-Dev mailing list