Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plugin loading #699

Merged
merged 2 commits into from
Aug 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ v0.6 (unreleased)
v0.5.2 (unreleased)
-------------------

* No changes yet
* Fix loading of plugins with setuptools < 11.3

v0.5.1 (2015-07-06)
-------------------
Expand Down
5 changes: 3 additions & 2 deletions glue/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ def load_plugins():
# where ``setup`` is a function that does whatever is needed to set up the
# plugin, such as add items to various registries.

logger.info("Loading external plugins")
import setuptools
logger.info("Loading external plugins using setuptools=={0}".format(setuptools.__version__))
from ._plugin_helpers import iter_plugin_entry_points
for item in iter_plugin_entry_points():
if item.module_name in _loaded_plugins:
logger.info("Plugin {0} already loaded".format(item.name))
continue
try:
function = item.resolve()
function = item.load()
function()
except Exception as exc:
logger.info("Loading plugin {0} failed (Exception: {1})".format(item.name, exc))
Expand Down