Reputation: 1005
I mean all of it, starting from all sources, and ending up with the .MSI file on the Python website. This includes building the distutils wininst*.exe files. I have found various READMEs that get me some of the way, but no comprehensive guide.
Upvotes: 0
Views: 190
Reputation: 1005
Since nobody answered, I'll post what I found here.
These instructions are for an 'offline' build machine, e.g. download/obtain everything you need prior to setting up the build environment. I don't connect my build machines to the internet. The instructions assume you downloaded the 2.7.10 PSF source release. This may have been made easier in git. I'm only showing the 32-bit build here, the 64-bit build needs some extra steps.
Pre-reqs:
For building documentation, install the following. If you are connected to the internet you can let pip download these as they are dependencies of Sphinx.
Go to tools/buildbot/build.bat and edit the file, change the 'Debug' build targets to 'Release'. Remove '_d' from the kill_python exe name.
Go to the 'Doc' directory. Type 'make.bat htmlhelp' to build the help. Go to file Tools/buildbot/buildmsi.bat, and change the help workshop command line to point to what you created in the previous step, e.g.:
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\python2710.hhp
Edit Tools/buildbot/external.bat, stop the build being a debug build by changing as follows:
if not exist tcltk\bin\tcl85g.dll ( @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install cd tcl-8.5.15.0\win nmake -f makefile.vc INSTALLDIR=..\..\tcltk clean all nmake -f makefile.vc INSTALLDIR=..\..\tcltk install cd ..\.. ) if not exist tcltk\bin\tk85g.dll ( cd tk-8.5.15.0\win nmake -f makefile.vc INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 clean nmake -f makefile.vc INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 all nmake -f makefile.vc INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 install cd ..\.. ) if not exist tcltk\lib\tix8.4.3\tix84g.dll ( cd tix-8.4.3.5\win nmake -f python.mak DEBUG=0 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk clean nmake -f python.mak DEBUG=0 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk all nmake -f python.mak DEBUG=0 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk install cd ..\.. )
In buildbot/external-common.bat, simply remove the clause building Nasm as we are already providing that as a binary.
I haven't documented the build of the wininst*.exe stubs from distutils, but the PSF ones are binary-identical to the ones in the ActiveState Python distribution 2.7.8.10, so you can just copy from there.
Finally, from the root directory run tools\buildbot\buildmsi.bat. This will build the 32-bit installer.
Upvotes: 1