1+ Quick Start Guide
2+ -----------------
3+
4+ 1. Install Microsoft Visual C++ 2010 SP1, any edition.
5+ 2. Install Subversion, and make sure 'svn.exe' is on your PATH.
6+ 3. Install NASM, and make sure 'nasm.exe' is on your PATH.
7+ 4. Run "build.bat -e" to build Python in 32-bit Release configuration.
8+ 5. (Optional, but recommended) Run the test suite with "rt.bat -q".
9+
10+
111Building Python using Microsoft Visual C++
212------------------------------------------
313
@@ -24,8 +34,8 @@ All you need to do to build is open the solution "pcbuild.sln" in Visual
2434Studio, select the desired combination of configuration and platform,
2535then build with "Build Solution" or the F7 keyboard shortcut. You can
2636also build from the command line using the "build.bat" script in this
27- directory. The solution is configured to build the projects in the
28- correct order.
37+ directory; see below for details . The solution is configured to build
38+ the projects in the correct order.
2939
3040The solution currently supports two platforms. The Win32 platform is
3141used to build standard x86-compatible 32-bit binaries, output into this
@@ -56,6 +66,26 @@ Release
5666 settings, though without PGO.
5767
5868
69+ Building Python using the build.bat script
70+ ----------------------------------------------
71+
72+ In this directory you can find build.bat, a script designed to make
73+ building Python on Windows simpler. The only absolute requirement for
74+ using this script is for the VS100COMNTOOLS environment variable to be
75+ properly set, which should be done by Microsoft Visual C++ 2010
76+ installation.
77+
78+ By default, build.bat will build Python in Release configuration for
79+ the 32-bit Win32 platform. It accepts several arguments to change
80+ this behavior:
81+
82+ -c <configuration> Set the configuration (see above)
83+ -d Shortcut for "-c Debug"
84+ -p <platform> Set the platform to build for ("Win32" or "x64")
85+ -r Rebuild instead of just building
86+ -e Use get_externals.bat to fetch external sources
87+
88+
5989Legacy support
6090--------------
6191
@@ -227,25 +257,18 @@ Getting External Sources
227257The last category of sub-projects listed above wrap external projects
228258Python doesn't control, and as such a little more work is required in
229259order to download the relevant source files for each project before they
230- can be built. The buildbots must ensure that all libraries are present
231- before building, so the easiest approach is to run either external.bat
232- or external-amd64.bat (depending on platform) in the ..\Tools\buildbot
233- directory from ..\, i.e.:
234-
235- C:\python\cpython\PCbuild>cd ..
236- C:\python\cpython>Tools\buildbot\external.bat
237-
238- This extracts all the external sub-projects from
260+ can be built. However, a simple script is provided to make this as
261+ painless as possible, called "get_externals.bat" and located in this
262+ directory. This script extracts all the external sub-projects from
239263 http://svn.python.org/projects/external
240- via Subversion (so you'll need an svn.exe on your PATH) and places them
264+ via Subversion (so you'll need svn.exe on your PATH) and places them
241265in ..\.. (relative to this directory).
242266
243267It is also possible to download sources from each project's homepage,
244- though you may have to change the names of some folders in order to make
245- things work. For instance, if you were to download a version 5.0.7 of
246- XZ Utils, you would need to extract the archive into ..\..\xz-5.0.5
247- anyway, since that is where the solution is set to look for xz. The
248- same is true for all other external projects.
268+ though you may have to change folder names or pass the names to MSBuild
269+ as the values of certain properties in order for the build solution to
270+ find them. This is an advanced topic and not necessarily fully
271+ supported.
249272
250273
251274Building for AMD64
0 commit comments