lsst.sconsUtils  13.0-7-gc601e82+2
 All Classes Namespaces Files Functions Variables Properties Groups
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
lsst.sconsUtils.dependencies.PackageTree Class Reference

A class for loading and managing the dependency tree of a package, as defined by its configuration module (.cfg) file. More...

Inheritance diagram for lsst.sconsUtils.dependencies.PackageTree:

Public Member Functions

def __init__
 Recursively load *.cfg files for packageName and all its dependencies. More...
 
def configure
 
def __contains__
 
def __getitem__
 
def get
 
def keys
 

Public Attributes

 cfgPath
 
 packages
 
 customTests
 
 primary
 

Static Public Attributes

 has_key = __contains__
 

Properties

 name = property(lambda self: self.primary.config.name)
 

Detailed Description

A class for loading and managing the dependency tree of a package, as defined by its configuration module (.cfg) file.

This tree isn't actually stored as a tree; it's flattened into an ordered dictionary as it is recursively loaded.

The main SCons produced by configure() and available as sconsUtils.env will contain an instance of this class as env.dependencies.

Its can be used like a read-only dictionary to check whether an optional package has been configured; a package that was not found will have a value of None, while a configured package's value will be its imported .cfg module.

Constructor & Destructor Documentation

def lsst.sconsUtils.dependencies.PackageTree.__init__ (   self,
  primaryName,
  noCfgFile = False 
)

Recursively load *.cfg files for packageName and all its dependencies.

Parameters
primaryNameThe name of the primary package being built.
noCfgFileIf True, this package has no .cfg file

After init, self.primary will be set to the configuration module for the primary package, and self.packages will be an OrderedDict of dependencies (excluding self.primary), ordered such that configuration can proceed in iteration order.

Member Function Documentation

def lsst.sconsUtils.dependencies.PackageTree.__contains__ (   self,
  name 
)
def lsst.sconsUtils.dependencies.PackageTree.__getitem__ (   self,
  name 
)
def lsst.sconsUtils.dependencies.PackageTree.configure (   self,
  env,
  check = False 
)
def lsst.sconsUtils.dependencies.PackageTree.get (   self,
  name,
  default = None 
)
def lsst.sconsUtils.dependencies.PackageTree.keys (   self)

References lsst.sconsUtils.dependencies.PackageTree._current, lsst.sconsUtils.dependencies.PackageTree._recurse(), lsst.sconsUtils.dependencies.PackageTree._tryImport(), lsst.sconsUtils.dependencies.PackageTree.cfgPath, lsst.sconsUtils.dependencies.PackageTree.customTests, lsst.sconsUtils.dependencies.PackageTree.name, and lsst.sconsUtils.dependencies.PackageTree.packages.

Member Data Documentation

lsst.sconsUtils.dependencies.PackageTree.cfgPath
lsst.sconsUtils.dependencies.PackageTree.customTests
lsst.sconsUtils.dependencies.PackageTree.has_key = __contains__
static
lsst.sconsUtils.dependencies.PackageTree.packages
lsst.sconsUtils.dependencies.PackageTree.primary

Property Documentation

lsst.sconsUtils.dependencies.PackageTree.name = property(lambda self: self.primary.config.name)
static

The documentation for this class was generated from the following file: