I want to use setuptools entry points to subscribe groups of methods to messages coming from a communication channel.
That is very easy to do by declaring all entry points in your setup.py
. But I'm not sure if I'll be able to add more entry points while the program is running.
Is it possible to add new entry points to an application that is already running?
I tried to add a new "fake" setuptools command in an interactive session:
std = pkg_resources.get_distribution('setuptools')
pkg_resources.EntryPoint.parse_group(
'distutils.commands', 'antialias = setuptools.command.alias:alias', std)
pprint(std.get_entry_map())
But my new entry point is not present in the printed object. Am I doing something wrong?