diff -r 85f290e474e2 index.rst --- a/index.rst Mon Mar 17 21:35:56 2014 -0500 +++ b/index.rst Wed Mar 19 13:54:39 2014 -0500 @@ -187,6 +187,7 @@ :numbered: setup + setupwindows help patch runtests diff -r 85f290e474e2 setup.rst --- a/setup.rst Mon Mar 17 21:35:56 2014 -0500 +++ b/setup.rst Wed Mar 19 13:54:39 2014 -0500 @@ -49,9 +49,9 @@ If you want a working copy of an already-released version of Python, i.e., a version in :ref:`maintenance mode `, you can update your -working copy. For instance, to update your working copy to Python 3.4, do:: +working copy. For instance, to update your working copy to Python 3.3, do:: - hg update 3.4 + hg update 3.3 You will need to re-compile CPython when you do such an update. @@ -216,7 +216,6 @@ Windows ''''''' - The readme included in the solution has more details, especially on the software needed to resolve the below mentioned build errors. @@ -240,11 +239,12 @@ `_. To build from the Visual Studio GUI, open the ``pcbuild.sln`` solution file -with Visual Studio. Choose the :menuselection:`Build Solution` option -under the :menuselection:`Build` or :menuselection:`Debug` menu -(depending on your version of Visual Studio). Be sure that "Debug" was -chosen as the active solution configuration (e.g. under -:menuselection:`Build --> Configuration Manager...`). +with Visual Studio. If you are using C++ Express, you may get an error message +indicating solution files are not supported, you can ignore it. Choose the +:menuselection:`Build Solution` option under the :menuselection:`Build` or +:menuselection:`Debug` menu (depending on your version of Visual Studio). +Be sure that "Debug" was chosen as the active solution configuration +(e.g. under :menuselection:`Build --> Configuration Manager...`) When building you may see a number of build errors related to missing files or directories. These do not necessarily mean that Python failed @@ -267,6 +267,8 @@ ``PCBuild\amd64\python_d.exe``. If you are compiling in release mode (which you shouldn't, in general), replace ``python_d.exe`` with ``python.exe``. +For additional help for Windows see :ref:`windows-advanced` + .. _build_troubleshooting: Troubleshooting the build diff -r 85f290e474e2 setupwindows.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setupwindows.rst Wed Mar 19 13:54:39 2014 -0500 @@ -0,0 +1,126 @@ +.. _windows-advanced: + +============================= +Setting Up Windows - Advanced +============================= + +The online directions for downloading the development version source are fine +and can be found at :ref:`Windows `. There is also +information in the readme file found in the source directory that is helpful. + +Mercurial must be installed on your machine. +Stable released version source is available on the download page. + +Subversion is necessary because some of the third party components for the +windows built are still in a subversion repository. + +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. + +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. + +------ +Step 1 +------ + +Download and install perl and add the executable to your path. + +------ +Step 2 +------ + +Download and install Visual Studio 2010. Either Express C++ will work or +Visual Studio Professional. Express is free, however, when the solution file +is loaded, an error message is displayed. + +Visual Studio should be in your path. + +------ +Step 3 +------ + +Download and install `NASM `_ + +------ +Step 4 +------ + +Download and build the external subprojects with the buildbots using either:: + + Tools\buildbot\external.bat # for 32 bit processors + Tools\buildbot\external-amd64.bat # for 64 bit processors + +from the root directory or your python distribution. +This step will download the correct versions of the external projects for +this version of python. There are several projects + +------ +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 + +Using Visual Studio +=================== + +There is `Python Tools for Visual Studio `_ an addon published +by Microsoft for many versions of Visual Studio except the Express editions. \ No newline at end of file