diff --git a/certbot/constants.py b/certbot/constants.py index ef59b8769..1d4efe80e 100644 --- a/certbot/constants.py +++ b/certbot/constants.py @@ -8,6 +8,9 @@ from acme import challenges SETUPTOOLS_PLUGINS_ENTRY_POINT = "certbot.plugins" """Setuptools entry point group name for plugins.""" +OLD_SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins" +"""Plugins Setuptools entry point before rename.""" + CLI_DEFAULTS = dict( config_files=[ "/etc/letsencrypt/cli.ini", diff --git a/certbot/plugins/disco.py b/certbot/plugins/disco.py index eb3851d34..d88b871f6 100644 --- a/certbot/plugins/disco.py +++ b/certbot/plugins/disco.py @@ -1,5 +1,6 @@ """Utilities for plugins discovery and selection.""" import collections +import itertools import logging import pkg_resources @@ -164,8 +165,12 @@ class PluginsRegistry(collections.Mapping): def find_all(cls): """Find plugins using setuptools entry points.""" plugins = {} - for entry_point in pkg_resources.iter_entry_points( - constants.SETUPTOOLS_PLUGINS_ENTRY_POINT): + entry_points = itertools.chain( + pkg_resources.iter_entry_points( + constants.SETUPTOOLS_PLUGINS_ENTRY_POINT), + pkg_resources.iter_entry_points( + constants.OLD_SETUPTOOLS_PLUGINS_ENTRY_POINT),) + for entry_point in entry_points: plugin_ep = PluginEntryPoint(entry_point) assert plugin_ep.name not in plugins, ( "PREFIX_FREE_DISTRIBUTIONS messed up")