distutils/package installers on windows
Thomas Heller
theller at python.net
Mon Feb 18 16:38:46 EST 2002
"David Bolen" <db3l at fitlinxx.com> wrote in message news:u4rkezl0l.fsf at ctwd0143.fitlinxx.com...
> The binary portion of the windows specific installer is hardcoded into
> the distutils package (encoded in the bdist_wininst.py module), and it
> doesn't appear that source is available (at least I can't seem to find
> it even in the CVS tree) so changing how it behaves doesn't seem easy.
> You could replace it outright, but then you'd have to duplicate its
> existing functionality as well.
The source code IS available:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/distutils/
in the misc directory. Guess I'll have to add a note about this
to the source... There is a tricky symbolic link somewhere on SF
which links parts of the distutils tree into the Python source tree.
> Having some additional hooks created in distutils to execute
> post-installation sounds like it could be a useful enhancement. At
> least with that sort of scenario you could write your own shortcut
> creating code without modifying the core distutils itself.
I'm currently working on an bdist_wininst enhancement which
takes an additional command line option (--install-script <script.py>).
This script would then be run (with sys.argv set to [script_name, '--installed'])
after all the files have been copied, and it would again be run
(with sys.argv set to [script_name, '--removed']) just before
the deinstaller is about to remove all the files and directories.
Thomas
More information about the Python-list
mailing list