deinstall (Was: Re: [Distutils] setup.py clean questions )
Jack Jansen
jack@oratrix.nl
Fri Feb 16 05:36:01 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.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm