LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A class for loading and managing the dependency tree of a package, as defined by its configuration module (.cfg) file. More...
Public Member Functions | |
def | __init__ |
Recursively load *.cfg files for packageName and all its dependencies. More... | |
def | configure |
Configure the entire dependency tree in order. More... | |
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) | |
Private Member Functions | |
def | _tryImport |
def | _recurse |
Private Attributes | |
_current | |
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.
Definition at line 388 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.__init__ | ( | self, | |
primaryName, | |||
noCfgFile = False |
|||
) |
Recursively load *.cfg files for packageName and all its dependencies.
primaryName | The name of the primary package being built. |
noCfgFile | If 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.
Definition at line 400 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.__contains__ | ( | self, | |
name | |||
) |
Definition at line 461 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.__getitem__ | ( | self, | |
name | |||
) |
Definition at line 466 of file dependencies.py.
|
private |
|
private |
Search for and import an individual configuration module from file.
Definition at line 483 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.configure | ( | self, | |
env, | |||
check = False |
|||
) |
Configure the entire dependency tree in order.
and return an updated environment."""
Definition at line 441 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.get | ( | self, | |
name, | |||
default = None |
|||
) |
Definition at line 472 of file dependencies.py.
def lsst.sconsUtils.dependencies.PackageTree.keys | ( | self | ) |
Definition at line 478 of file dependencies.py.
|
private |
Definition at line 409 of file dependencies.py.
lsst.sconsUtils.dependencies.PackageTree.cfgPath |
Definition at line 401 of file dependencies.py.
lsst.sconsUtils.dependencies.PackageTree.customTests |
Definition at line 403 of file dependencies.py.
|
static |
Definition at line 464 of file dependencies.py.
lsst.sconsUtils.dependencies.PackageTree.packages |
Definition at line 402 of file dependencies.py.
lsst.sconsUtils.dependencies.PackageTree.primary |
Definition at line 411 of file dependencies.py.
|
static |
Definition at line 438 of file dependencies.py.