Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (33 sloc) 1.13 KB
import pkg_resources
from pylons import config
from anygit.backends import common
# Top level names to import
__BACKEND_VARS = ['create_schema',
__COMMON_VARS = ['flush',
# Get the first (and only) entry point, and extract the given
# names into our namespace.
__BACKEND_NAME = config.get('backend', 'mongodb')
__BACKEND_EP = pkg_resources.iter_entry_points('anygit.backend', __BACKEND_NAME).next()
for module, variables in [(common, __COMMON_VARS), (__BACKEND, __BACKEND_VARS)]:
for variable in variables:
globals()[variable] = getattr(module, variable)
del module, variable, variables