Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a script when a user uninstalls my package with pip?

My setup.py is adding an entry to the user's crontab on installation. I want to remove that entry if the user uninstalls the package. From what I've seen, it seems impossible. Hoping someone here has a solution.

like image 638
seriousdev Avatar asked Nov 10 '22 01:11

seriousdev


1 Answers

This is not possible at this moment, see python setup.py uninstall

Still, there is this feature request for implementing it https://github.com/pypa/pip/issues/857 which is more than 1.5 years old and without any comments on it.

This makes me think that it will not happen too soon. I do also suspect that there may be some other issues that do prevent this from being implemented.

like image 55
sorin Avatar answered Nov 14 '22 21:11

sorin