Package flumotion :: Package common :: Module package :: Class Packager
[show private | hide private]
[frames | no frames]

Class Packager

Loggable --+
           |
          Packager


I am an object through which package paths can be registered, to support the partitioning of the module import namespace across bundles.
Method Summary
  __init__(self)
  getPathsForPackage(self, packageName)
Return all absolute paths to the top level of a tree from which (part of) the given package name can be imported.
  install(self)
Install our custom importer that uses bundled packages.
  registerPackagePath(self, packagePath, key, prefix)
Register a given path as a path that can be imported from.
  unregister(self)
Unregister all previously registered package paths, and uninstall the custom importer.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

getPathsForPackage(self, packageName)

Return all absolute paths to the top level of a tree from which (part of) the given package name can be imported.

install(self)

Install our custom importer that uses bundled packages.

registerPackagePath(self, packagePath, key, prefix='flumotion')

Register a given path as a path that can be imported from. Used to support partition of bundled code or import code from various uninstalled location.

sys.path will also be changed to include this, and remove references to older packagePath's for the same bundle.
Parameters:
packagePath - path to add under which the module namespaces live, (ending in an md5sum, for flumotion purposes)
           (type=string @param key a unique id for the package being registered)
key
           (type=string)
prefix - prefix of the packages to be considered
           (type=string)

unregister(self)

Unregister all previously registered package paths, and uninstall the custom importer.

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'packager'                                                             

Generated by Epydoc 2.1 on Fri Apr 6 10:10:26 2007 http://epydoc.sf.net