G
George van den Driessche
Hi folks,
I'm looking at packaging a project I'm working on using distutils. The
project is for Windows and contains a COM server which needs
registration, so the installer needs to be a little more complicated
than usual. Looking at the options for the bdist_wininst command to
distutils, I see it's possible to specify
--install-script=<myinstallscript>
which ought to do the trick. But to use this, myinstallscript itself
must first be installed by passing
scripts='myinstallscript'
to distutils.core.setup in setup.py. That will copy myinstallscript
into a particular location (C:\Python24\Scripts in my case) and leave
it there forever. Which raises a couple of questions:
- Why is myinstallscript left there forever? The documentation makes
some vague reference to needing it for uninstalling packages, but then
I can't actually find a way to uninstall packages.
- What is the use of the Scripts directory on Windows? It's not added
to my PATH, so unless I do that myself it won't do anything like it's
meant to on other platforms.
- Should I supply myinstallscript, or myinstallscript.py? I suspect the
latter, since that's the only way to give files types on Windows.
- Is there some other better way to perform post-installation actions?
Would it work out of a binary generated from bdist_wininst?
- Should I even be using distutils? It doesn't really matter that much
where the files are installed because the COM server can register
itself to run out of whatever location it happens to be in.
Thanks,
George
I'm looking at packaging a project I'm working on using distutils. The
project is for Windows and contains a COM server which needs
registration, so the installer needs to be a little more complicated
than usual. Looking at the options for the bdist_wininst command to
distutils, I see it's possible to specify
--install-script=<myinstallscript>
which ought to do the trick. But to use this, myinstallscript itself
must first be installed by passing
scripts='myinstallscript'
to distutils.core.setup in setup.py. That will copy myinstallscript
into a particular location (C:\Python24\Scripts in my case) and leave
it there forever. Which raises a couple of questions:
- Why is myinstallscript left there forever? The documentation makes
some vague reference to needing it for uninstalling packages, but then
I can't actually find a way to uninstall packages.
- What is the use of the Scripts directory on Windows? It's not added
to my PATH, so unless I do that myself it won't do anything like it's
meant to on other platforms.
- Should I supply myinstallscript, or myinstallscript.py? I suspect the
latter, since that's the only way to give files types on Windows.
- Is there some other better way to perform post-installation actions?
Would it work out of a binary generated from bdist_wininst?
- Should I even be using distutils? It doesn't really matter that much
where the files are installed because the COM server can register
itself to run out of whatever location it happens to be in.
Thanks,
George