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

Thomas Heller thomas.heller@ion-tof.com
Fri Feb 16 05:47:02 2001


> 
> > Here is a simple deinstall command, which you can
> > use in your setup script. This can at least be a base for
> > a discussion about a more complete one.
> 
> Yes, this is pretty much what I had in mind. One point:
> 
> >             elif os.path.isdir(name):
> >                 self._removefiles(name, os.path.join(srcdir, n))
> >                 if not self.dry_run:
> >                     os.rmdir(name)
> 
> I think this needs a try/except around the rmdir(), with a message in the 
> except that the rmdir failed, and possibly, if it failed because the directory 
> wasn't empty, a note that there may may be user additions there.
OK.

I currently only use this during development. Do you think
we should try to establish this as a standard distutils command?

Thomas