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

M.-A. Lemburg mal@lemburg.com
Fri Feb 16 09:48:01 2001


Thomas Heller wrote:
> 
> > One could try to let the install(_data) command run in a quiet dry_run
> > mode,
> > afterwards you could get all file names by calling get_outputs() for
> > the install command.
> > (You have to run the command because at least for install_data the
> > internal outputs variable is set by run(). )
> Better would be to replicate and invert the code from
> install_data.run(), because we would want to also
> remove directories created.

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.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/