Python: execute action at package uninstall
问题 In one of my python project I create a config folder in the user directory. However, when the package is uninstalled via pip, the config folder remains still. There isn't any confidential data so this isn't a security problem but I would like to delete it for user convenience. My question is, is there any way of doing it properly? 回答1: Python wheels — and even less eggs or sdists — are not full-blown packages, they don't have post-install or pre-uninstall script. And they probably shouldn't.