I have a python package that uses distutils. I would like to configure the setup.py to do either of the following:
- Detect a previously-installed version of the package and raise an error
- Offer to remove the previously-installed version before proceeding with the installation
Any hints? A custom subclass of distutils.command.install is probably needed, but the documentation is a bit terse.