diff -r 1d523b48efa3 PCbuild/readme.txt --- a/PCbuild/readme.txt Tue Mar 25 10:13:44 2014 +0100 +++ b/PCbuild/readme.txt Tue Mar 25 07:43:36 2014 -0500 @@ -10,7 +10,8 @@ Visual C++ 2010 Express Edition Required for building 32-bit Debug and Release configuration builds. This edition does not support "solution folders", which pcbuild.sln - uses; this will not prevent building. + uses; this will not prevent building and you can safely dismiss the + warning. Visual Studio 2010 Professional Edition Required for building 64-bit Debug and Release configuration builds Visual Studio 2010 Premium Edition @@ -335,3 +336,127 @@ If you want to create your own extension module DLL (.pyd), there's an example with easy-to-follow instructions in ..\PC\example\; read the file readme.txt there first. + + +Advanced Setting up Windows +--------------------------- + +Stable released version source for Python is available on the download page. +https://www.python.org/downloads/source/ + +Mercurial must be installed on your machine. A good choice is TortoiseHG +at http://tortoisehg.bitbucket.org/. + +Python building/rebuilding assumes the existence of Subversion, Perl, and +a version of Visual Studio on your system. If you have all three, skip to +step three. Otherwise download and install any of those that are missing. + +However, it is not necessary, an alterative means: + Download your sources directly from their respective vendors, and put + where the VS project files expect them to be. Perl is not necessary if + you pulled your OpenSSL sources from svn.python.org, it is only required + if you're using sources you got straight from the OpenSSL folks. + +If it is necessary to have on hand multiple versions of python built from +scratch, you should isolate them from each other by putting them in a +container directory perhaps of the same name: + +python331/python331, python32/python32 + +where the subdirectory is the source root directory. Use the upper directory to +isolate the external subprojects created by the buildbots described later. +The buildbots of one version can wipe out required subprojects of another version +of python which can cause confusion. + +Step 0 +------ + +Download and install a Subversion client and add the executable to your path. +Subversion is necessary because some of the third party components for the +windows built are still in a subversion repository. + +Step 1 +------ + +Download and install Perl and add the executable to your path. + +Step 2 +------ + +Download and install Visual Studio 2010. Visual Studio should be in your path. + +Step 3 +------- + +Download and install NASM http://nasm.us/ + +Step 4 +------- + + The VS project files expect external libraries that they need to be in + folders on the same level as the cpython source checkout, for example, at + ``PCbuild\..\..\openssl-1.0.1e``. Since different versions of Python use + different versions (or different builds) of the various external libraries, + it is recommended to build different Python versions in isolated folders. + For example: + + C:\ + |_ Source + |_ python3.4 + | |_ cpython + | |_ tcl-8.6.1.0 + | |_ tk-8.6.1.0 + | |_ tcltk + | |_ ... + | + |_ python3.3 + |_ cpython + |_ tcl-8.5.11.0 + |_ tk-8.5.11.0 + |_ tcltk + |_ ... + +Step 5 +------ + +openssl is used for python on windows ssl rarely succeeds if you proceed to +build using pcbuild.sln: + +The following steps will resolve many problems if you executing them before +building with the .sln file: + +cd into the openssl directory created by the buildbots +perl util\mkdef.pl crypto ssl update +perl Configure VC-WIN32 --prefix=C:\opt\openssl-1.0.1d +ms\do_nasm + +Compilation errors may occur when you attempt to build the .sln file with Visual +Studio. The errors are typically a forced error contained within a block of +conditional code. Good results have been found by commenting out the forced error. +Most recently commenting out code blocks in mdc2.h and idea.h produced good results. + +Historically, the openssl build has not had a “clean” function. Cleaning the +project by deleting and letting the buildbot download again gave good results. + +Step 6 +------ + +Finally Build python and its internal subprojects + +Open the solution “pcbuild.sln” in Visual Studio If you have an express version, +then ignore the warning. Select the configuration (Release or Debug) + +"Release" builds python.exe +"Debug" builds python_d.exe +Select the platform Win32 or x64 +Build the solution. +Right click "Solution 'pccuild'" and select + build - for fresh build + clean - to delete all files created for build , i.e. objects, + libraries, executable, etc. + rebuild - clean and build everything + +Note that you can clean and build individual subprojects by right clicking on +the subproject and selecting build, clean, or rebuild for that project. + +