[Python-Dev] make a Windows installation package (.msi) for Python 3.3

Brian Curtin brian at python.org
Fri May 10 23:13:04 CEST 2013


On Fri, May 10, 2013 at 12:31 PM, Jianfeng Mao <JMao at rocketsoftware.com> wrote:
> To Python Windows Release Managers:
>
>
>
> My name is Jianfeng Mao and I am a software developer at the U2 group in
> Rocket Software (http://u2.rocketsoftware.com/).   I am currently working on
> a project to embed a slightly customized Python interpreter in our product.
> For easy installation and setup,  we hope to be able to do the standard
> Python installation during the installation of our software.  Basically I
> want to create a .msi file that can be called to install the full Python if
> the user needs this new feature. Brian Curtin (brian at python.org)  pointed me
> to Tools/msi/msi.py for the Windows MSI builder. I tried to follow  the
> instructions in the README but couldn’t make it to work after a few twists
> and turns.  Brian mentioned that few people needs to do this and only
> release managers handle the packaging of Python.  I have listed the steps I
> have done in my attempt to create the .msi file. Please let me know if I
> have missed anything  or done anything wrong.
>
>
>
>
>
> 1.       hg clone http://hg.python.org/cpython
>
> 2.       cd cpython
>
> 3.       hg update 3.3
>
> 4.       cd tools\buildbot,  edit build.bat to change the configuration from
> Debug to Releaes; edit external.bat, change DEBUG=1 to DEBUG=0
>
> 5.       go back to cpython\ and run tools\buildbot\build.bat
>
> 6.       cd PC, then do ‘nmake –f icons.mak’
>
> 7.       cd ..\tools\msi
>
> 8.       c:\python27\python msi.py
>
>
>
> WARNING: nm did not run successfully - libpythonXX.a not built
>
>         cl /O2 /D WIN32 /D NDEBUG /D _WINDOWS /MT /W3 /c msisupport.c
>
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for
> 80x86
>
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
> msisupport.c
>
>         link.exe /OUT:msisupport.dll /INCREMENTAL:NO /NOLOGO /DLL
> /SUBSYSTEM:WIN
>
> DOWS /OPT:REF /OPT:ICF msisupport.obj msi.lib kernel32.lib
>
>    Creating library msisupport.lib and object msisupport.exp
>
> Traceback (most recent call last):
>
>   File "msi.py", line 1336, in <module>
>
>     add_files(db)
>
>   File "msi.py", line 961, in add_files
>
>     generate_license()
>
>   File "msi.py", line 914, in generate_license
>
>     raise ValueError, "Could not find "+srcdir+"/../"+pat
>
> ValueError: Could not find C:\temp\cpython/../tcl8*

I'm in an airport and on a Mac right now so I can't test it, but IIRC
you just need to adjust the script to look for tcl-8* and not tcl8* on
line 908 of msi.py. You'll probably have to do the same for tk. If you
come across other exceptions about tcl, tk, or other dependencies,
it's likely that the paths are just incorrect.

There may be a patch for this on bugs.python.org because I know I've
gone through it.


More information about the Python-Dev mailing list