bdist_wininst: post-installation changes?

I don't think this is supported, but I just want to make sure... Is there any way, in the generated Win32 installer, to have it perform some arbitrary post-installation editing? To cover Win9x systems, I'd like to install a .bat file in C:\PythonXX\ using the Bruce Eckel preamble from the Python FAQ: @echo off rem = """ rem run python on this bat file. Needs the full path where rem you keep your python files. The -x causes python to skip rem the first line of the file: python -x c:\aaa\Python\\"%0".bat %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofpython rem """ # The python program goes here: The problem is that the "%0" expansion needs the full path name to where the .bat file is installed (C:\PythonXX\), and that's not known until the installer runs and consults the registry to find out where Python is located. Is there anything I can have the installer do to accomodate this? A quick glance at the code didn't turn up anything (but it *was* very quick... :-). --SK

Steven Knight wrote:
Yes. Thomas Heller has checked in an update of the installer which supports this. You have to get it from CVS, though.
No idea, I guess you'll have to look just a bit closer ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/

From: "M.-A. Lemburg" <mal@lemburg.com>
Right. The only documentation so far are the last two logmessages (ask me if you need more): http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/distutils/misc/install... and the updated bdist_wininst.py is here (watch out for wrapped URL): http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/python/distutils/d...
@runpython c:\aaa\Python\%0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 # start of python code print "Hello" # or whatever # EOF - you don't have to supply the 'endofpython' footer from above. when you have a batch file in your PATH named 'runpython.bat' which looks like this: @c:\python22\python -x %1 %2 %3 %4 %5 %6 %7 %8 %9 The full path before the %0.bat in the first file is still needed, unfortunately (or you always have to call your batch file with it's full pathname). Thomas

Steven Knight wrote:
Yes. Thomas Heller has checked in an update of the installer which supports this. You have to get it from CVS, though.
No idea, I guess you'll have to look just a bit closer ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/

From: "M.-A. Lemburg" <mal@lemburg.com>
Right. The only documentation so far are the last two logmessages (ask me if you need more): http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/distutils/misc/install... and the updated bdist_wininst.py is here (watch out for wrapped URL): http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/python/distutils/d...
@runpython c:\aaa\Python\%0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 # start of python code print "Hello" # or whatever # EOF - you don't have to supply the 'endofpython' footer from above. when you have a batch file in your PATH named 'runpython.bat' which looks like this: @c:\python22\python -x %1 %2 %3 %4 %5 %6 %7 %8 %9 The full path before the %0.bat in the first file is still needed, unfortunately (or you always have to call your batch file with it's full pathname). Thomas
participants (3)
-
M.-A. Lemburg
-
Steven Knight
-
Thomas Heller