deinstall (Was: Re: [Distutils] setup.py clean questions )

Rene Liebscher R.Liebscher@gmx.de
Fri Feb 16 10:18:01 2001


Thomas Heller wrote:
> 
> Marc-Andre Lemburg:
> >
> > Hmm, it would probably be better to add a new method to Commands
> > in general which undoes the actions applied by .run().
> >
> > In the above case, I'm using my own install_data Command class
> > because I found the standard version unusable for my purposes
> > (the standard command only installs data files in one directory,
> > whereas I must install files in multiple directories).
> >
> > The uninstall command would then call the .uninstall() method of
> > all install_* subcommands and have them do whatever is necessary
> > to implement the uninstall machinery.
> This would be one solution once the .uninstall() methods are all
> implemented.
> 
> On the other hand, the install_data command is _completely_
> undocumented (you have to read the source), and thus cannot really
> be improved. I'm quote sure there are missing some features...
> 
> The 2.1 idle setup() script even uses it's own subclasses
> of build_py and install_lib only to copy some
> .txt and -gif files. Strange.

Own classes for install are not a problem, if they are build correct.
For example bdist_rpm uses get_outputs() and if one has build its own
subclasses so bdist_rpm still works, then you can also get the complete
list of files from get_outputs().

For PyOpenGL I use a really complex install_data replacement and it
would be
easier to use it as it is than to extend it and later to explain the
people
which uses a later version of distutils (with install_data.uninstall())
why 
they see a traceback when they try to uninstall an older version of
PyOpenGL.
(BTW, not only PyOpenGL uses this install_data replacement, you can find
it 
also in pyxml.) 

If you really want to extend install_* then you could use this at least
as
a kind of fallback if you try to uninstall an older package.

Kind regards
Rene Liebscher