I've built Python, but can't figure out how to package it for windows

M

Mark Jones

Python 2.6.4 is built, and I found a bdist_wininst project and
wininst-8 project.

How do I manage to build the msi for this thing?
 
G

Gabriel Genellina

Python 2.6.4 is built, and I found a bdist_wininst project and
wininst-8 project.

How do I manage to build the msi for this thing?

See the Tools\msi directory; and look for some posts last year from Tim
Golden regarding some issues with the directory layout and other details.
 
M

Mark Jones

That was so simple, thanks.

I scanned all the folders for inst, install, setup, but since msi was
the expected output extension, I didn't see that!
 
M

Mark Jones

Turns out there is an tools/msi directory and in there is python code
to help build the MSI from the tree you built. Only problem is you
can't use it without having python and PythonWin installed. So I
grabbed 2.6.4 python and pythonwin and installed them.

It uses COM objects and the CabSDK from MS to build the MSI file. And
then it has a couple of "Issues" that I had to resolve. First you need
a VS2008 shell so you can

nmake -f msisupport.mak

then you need to grab a copy of TIX (I didn't have to build it, just
have it in place fore the license.terms file (probably could have just
removed that list member for the same effect, but I was worried about
something else being needed down below)

("Tcl", "tcl8*", "license.terms"), ("Tk", "tk8*", "license.terms"),
("Tix", "Tix-*", "license.terms")):

had to be changed to:

("Tcl", "tcl-8*", "license.terms"), ("Tk", "tk-8*", "license.terms"),
("Tix", "Tix*", "license.terms")):

because the package names have evidently changed in the not to distant
past?

After that, I ran c:\python26\python msi.py and then it griped about
the python264.chm being missing, so instead of trying to build it, I
grabbed the one from the copy of python I had to install in order to
build python and dumped it in the expected location.

Oh yea, I also had to go to the PC directory and

nmake -f icons.mak

This gave me a runnable msi file to install python (which was already
installed, so that I could build the msi file to install my own
version). Oh well, at least it is built now. Whew!
 
T

Tim Golden

On 11/02/2010 05:24, Mark Jones wrote:
[... problems building from tools/msi ...]

I sympathise. I went through similar hoops last year, merely to
be able to do it. I think I'm right in saying that very few
people are bothered enough to package their own MSI on windows
because the (probably very few) developers who have a need to
run bleeding-edge Python, eg to test out patches or whatever,
can simply run from <checkout>\pcbuild\python_d.exe or whatever.
And everyone else simply runs the MSI provided on python.org.

I'm fairly sure I'm right in saying that it's Martin von L
who builds the MSIs for python.org and if I haven't done it
before I'd like to offer him a vote of thanks for having done
and for continuing to do this. The tools/msi is used by him
to do those builds and does make certain assumptions. One,
in particular, is that you have an *existing* copy of some
recent Python running somewhere. (I use python25, I think).
Altho' it might be nice to be able to bootstrap, in practice
it isn't a problem.

For interest's sake I offer my make-snapshots area which I
use to build trunk or branches for Python 2.x / 3.x when I
have the change:

http://svn.tjg.org.uk/make-snapshots

Feel free to look at least to see what I'm doing. I think I
didn't bother with Tix (I don't use Tkinter) so thanks for
providing some input on that; I may well go back and retrofit.

TJG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top