I want people that know of the old name to be directed to the new name.
For the pypi website, it's easy to upload a package with a README linking to the new package.
I'm not sure what's the best way to handle people using pip to install it. I assume it might be possible to show an error on pip install old_name
, looking around it seems to be possible using cmdclass in setup.py and maybe throwing an exception in the right place but the documentation around it is scarce to put it mildly.
So I was wondering if anyone is aware of proper built-in systems for this, or common practices to handle this sort of thing.
Declare the new package a dependency of the old. See for example how scikit-learn does it: the old package sklearn declares in its setup.py
:
install_requires=['scikit-learn'],
Thus everyone who does pip install sklearn
automatically gets scikit-learn
.