Package flumotion :: Package common :: Module bundle :: Class BundlerBasket
[hide private]

Class BundlerBasket

source code

I manage bundlers that are registered through me.

Instance Methods [hide private]
 
__init__(self)
Create a new bundler basket.
source code
 
add(self, bundleName, source, destination=None)
Add files to the bundler basket for the given bundle.
source code
 
depend(self, depender, *dependencies)
Make the given bundle depend on the other given bundles.
source code
 
getDependencies(self, bundlerName)
Return names of all the dependencies of this bundle, including this bundle itself.
source code
 
getBundlerByName(self, bundlerName)
Return the bundle by name, or None if not found.
source code
 
getBundlerNameByImport(self, importString)
Return the bundler name by import statement, or None if not found.
source code
 
getBundlerNameByFile(self, filename)
Return the bundler name by filename, or None if not found.
source code
list of str
getBundlerNames(self)
Get all bundler names.
source code
Method Details [hide private]

add(self, bundleName, source, destination=None)

source code 

Add files to the bundler basket for the given bundle.

Parameters:
  • bundleName - the name of the bundle this file is a part of
  • source - the path to the file to add to the bundle
  • destination - a relative path to store this file in in the bundle. If unspecified, this will be stored in the top level

depend(self, depender, *dependencies)

source code 

Make the given bundle depend on the other given bundles.

Parameters:
  • depender (string)
  • dependencies (list of strings)

getDependencies(self, bundlerName)

source code 

Return names of all the dependencies of this bundle, including this bundle itself. The dependencies are returned in a correct depending order.

getBundlerNames(self)

source code 

Get all bundler names.

Returns: list of str
a list of all bundler names in this basket.