The first draft of a package in my library was a foo.py
file which I've now superseded with a Cython/C extension, a foo.so
- however, distutils doesn't automagically realise that the old .py file is gone, so both sit in the site-packages directory after install (and who knows which is loaded when you use import
..)
Obviously I can manually remove the old files myself, but I don't want users of my library to have to care about this sort of thing.
What is the canonical / distutils / pythonic way to handle this? Is there some syntax like
from distutils import setup
setup(..., depricated=['path/to/foo.py'])
to indicate obsolete .py files to be removed from install directories on upgrade?