PackageTree

class lsst.sconsUtils.dependencies.PackageTree(primaryName, noCfgFile=False)

Bases: object

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 lsst.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.

Parameters:
primaryNamestr

The name of the primary package being built.

noCfgFilebool, optional

If True, this package has no .cfg file

Notes

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.

Attributes Summary

name

Methods Summary

configure(env[, check])

Configure the entire dependency tree in order.

get(name[, default])

has_key(name)

keys()

Attributes Documentation

name

Methods Documentation

configure(env, check=False)

Configure the entire dependency tree in order. and return an updated environment.

get(name, default=None)
has_key(name)
keys()