Module plugin_registry
source code
|
|
json = None
hash(x)
|
|
|
default_plugin_dirs = []
|
Imports:
os,
sys,
pkg_resources,
DistributionNotFound,
shutil,
task,
reflect,
Failure,
common,
core_version,
default_config,
ComponentError,
Message,
Loggable,
defer,
locale_helper,
get_page,
enum,
md5
|
Check if the distribution is a development egg.
Development eggs store egg-info and python code in the same toplevel
directory.
- Parameters:
dist (Distribution) - plugin distribution
|
|
Get the top level directory of a plugin distribution.
Regular eggs and development eggs store files in different locations.
Use this function to access the top level directory of a plugin eg:
toplevel_directory = get_plugin_toplevel_directory(dist)
sub_directory = '%s/%s' % (toplevel_directory, 'sub')
requirement = pkg_resources.Requirement.parse(dist.project_name)
if pkg_resources.resource_isdir(requirement, sub_directory):
real_sub_path = pkg_resources.resource_filename(requirement,
sub_directory)
- Parameters:
dist (Distribution) - plugin distribution
|