Use stevedore to load extensions #640

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

marksteve commented Nov 26, 2012

I noticed stevedore when I updated to latest virtualenvwrapper recently.
I think it's nice to be able to do something like this:

from setuptools import setup

setup(
    name='Flask-SuperExtension',
    version='0.0.0',
    description='Super Extension',
    py_modules=['super_extension'],
    install_requires=['Flask'],
    entry_points={
        'flask.ext': [
            'super_extension = super_extension',
            ],
        }
)

I'm just throwing this out as an idea since it would add an extra dependancy.

Contributor

mgax commented Nov 26, 2012

I think pkg_resources has enough support for loading entry points. [ep.load() for ep in pkg_resources.iter_entry_points('flask.ext')] returns [super_extension].

Contributor

marksteve commented Nov 26, 2012

@magax Yeah. But I was also thinking about other stevedore use cases such as template/db drivers, enabled extensions, etc.

Contributor

kennethreitz commented Jan 25, 2013

I think this is unnecessary at this point. Thanks though, looks like something to consider in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment