-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
There are times when one might want to call a function to remove an item from the pkg_resources working_set, or deactivate a distribution. Notably, this may be useful in a script that manages installations of packages, such as python applications that can install and uninstall plugins.
There is already add() and add_entry(), but no remove() or remove_entry(). Similarly, there is an activate(), but no deactivate().
Searching the Internet, the closest two things I've found on this topic are a guess on StackOverflow about how to achieve this and a docs snippet that specifically warns against doing part of that guess, under https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-methods-and-attributes -> entries.
I haven't found anything in setuptools that does this, but I'm not intimately familiar with it either. If someone has good starting advice on how to achieve this, I'd be happy to take a stab at it myself. I would probably use the feature.