| 1 | Building Python using VC++ 8.0
|
|---|
| 2 | -------------------------------------
|
|---|
| 3 | This directory is used to build Python for Win32 platforms, e.g. Windows
|
|---|
| 4 | 95, 98 and NT. It requires Microsoft Visual C++ 8.0
|
|---|
| 5 | (a.k.a. Visual Studio 2005).
|
|---|
| 6 | (For other Windows platforms and compilers, see ../PC/readme.txt.)
|
|---|
| 7 |
|
|---|
| 8 | All you need to do is open the workspace "pcbuild.sln" in MSVC++, select
|
|---|
| 9 | the Debug or Release setting (using "Solution Configuration" from
|
|---|
| 10 | the "Standard" toolbar"), and build the projects.
|
|---|
| 11 |
|
|---|
| 12 | The proper order to build subprojects:
|
|---|
| 13 |
|
|---|
| 14 | 1) pythoncore (this builds the main Python DLL and library files,
|
|---|
| 15 | python25.{dll, lib} in Release mode)
|
|---|
| 16 | NOTE: in previous releases, this subproject was
|
|---|
| 17 | named after the release number, e.g. python20.
|
|---|
| 18 |
|
|---|
| 19 | 2) python (this builds the main Python executable,
|
|---|
| 20 | python.exe in Release mode)
|
|---|
| 21 |
|
|---|
| 22 | 3) the other subprojects, as desired or needed (note: you probably don't
|
|---|
| 23 | want to build most of the other subprojects, unless you're building an
|
|---|
| 24 | entire Python distribution from scratch, or specifically making changes
|
|---|
| 25 | to the subsystems they implement, or are running a Python core buildbot
|
|---|
| 26 | test slave; see SUBPROJECTS below)
|
|---|
| 27 |
|
|---|
| 28 | When using the Debug setting, the output files have a _d added to
|
|---|
| 29 | their name: python25_d.dll, python_d.exe, parser_d.pyd, and so on.
|
|---|
| 30 |
|
|---|
| 31 | SUBPROJECTS
|
|---|
| 32 | -----------
|
|---|
| 33 | These subprojects should build out of the box. Subprojects other than the
|
|---|
| 34 | main ones (pythoncore, python, pythonw) generally build a DLL (renamed to
|
|---|
| 35 | .pyd) from a specific module so that users don't have to load the code
|
|---|
| 36 | supporting that module unless they import the module.
|
|---|
| 37 |
|
|---|
| 38 | pythoncore
|
|---|
| 39 | .dll and .lib
|
|---|
| 40 | pythoncore_pgo
|
|---|
| 41 | .dll and .lib, a variant of pythoncore that is optimized through a
|
|---|
| 42 | Profile Guided Optimization (PGO), employing pybench as the profile
|
|---|
| 43 | case to optimize for. The results are produced as a python25.{dll,lib}
|
|---|
| 44 | in the subfolder 'pythoncore_pgo'. To use this instead of the
|
|---|
| 45 | standard Python dll place this dll with the python.exe.
|
|---|
| 46 | python
|
|---|
| 47 | .exe
|
|---|
| 48 | pythonw
|
|---|
| 49 | pythonw.exe, a variant of python.exe that doesn't pop up a DOS box
|
|---|
| 50 | _socket
|
|---|
| 51 | socketmodule.c
|
|---|
| 52 | _testcapi
|
|---|
| 53 | tests of the Python C API, run via Lib/test/test_capi.py, and
|
|---|
| 54 | implemented by module Modules/_testcapimodule.c
|
|---|
| 55 | pyexpat
|
|---|
| 56 | Python wrapper for accelerated XML parsing, which incorporates stable
|
|---|
| 57 | code from the Expat project: http://sourceforge.net/projects/expat/
|
|---|
| 58 | select
|
|---|
| 59 | selectmodule.c
|
|---|
| 60 | unicodedata
|
|---|
| 61 | large tables of Unicode data
|
|---|
| 62 | winsound
|
|---|
| 63 | play sounds (typically .wav files) under Windows
|
|---|
| 64 |
|
|---|
| 65 | The following subprojects will generally NOT build out of the box. They
|
|---|
| 66 | wrap code Python doesn't control, and you'll need to download the base
|
|---|
| 67 | packages first and unpack them into siblings of PCbuilds's parent
|
|---|
| 68 | directory; for example, if your PCbuild is .......\dist\src\PCbuild\,
|
|---|
| 69 | unpack into new subdirectories of dist\.
|
|---|
| 70 |
|
|---|
| 71 | _tkinter
|
|---|
| 72 | Python wrapper for the Tk windowing system. Requires building
|
|---|
| 73 | Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.12.
|
|---|
| 74 |
|
|---|
| 75 | Get source
|
|---|
| 76 | ----------
|
|---|
| 77 | In the dist directory, run
|
|---|
| 78 | svn export http://svn.python.org/projects/external/tcl8.4.12
|
|---|
| 79 | svn export http://svn.python.org/projects/external/tk8.4.12
|
|---|
| 80 | svn export http://svn.python.org/projects/external/tix-8.4.0
|
|---|
| 81 |
|
|---|
| 82 | Build Tcl first (done here w/ MSVC 7.1 on Windows XP)
|
|---|
| 83 | ---------------
|
|---|
| 84 | Use "Start -> All Programs -> Microsoft Visual Studio .NET 2003
|
|---|
| 85 | -> Visual Studio .NET Tools -> Visual Studio .NET 2003 Command Prompt"
|
|---|
| 86 | to get a shell window with the correct environment settings
|
|---|
| 87 | cd dist\tcl8.4.12\win
|
|---|
| 88 | nmake -f makefile.vc
|
|---|
| 89 | nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
|
|---|
| 90 |
|
|---|
| 91 | XXX Should we compile with OPTS=threads?
|
|---|
| 92 |
|
|---|
| 93 | Optional: run tests, via
|
|---|
|
|---|