lsst.sconsUtils  14.0-10-ga389a9f
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst.sconsUtils.dependencies.Configuration Class Reference

Base class for defining how to configure an LSST sconsUtils package. More...

Inheritance diagram for lsst.sconsUtils.dependencies.Configuration:
lsst.sconsUtils.dependencies.ExternalConfiguration

Public Member Functions

def __init__ (self, cfgFile, headers=(), libs=None, hasSwigFiles=True, includeFileDirs=["include"], libFileDirs=["lib"], hasDoxygenInclude=False, hasDoxygenTag=True, eupsProduct=None)
 Initialize the configuration object. More...
 
def addCustomTests (self, tests)
 Add custom SCons configuration tests to the Configure Context passed to the configure() method. More...
 
def configure (self, conf, packages, check=False, build=True)
 Update an SCons environment to make use of the package. More...
 

Static Public Member Functions

def parseFilename (cfgFile)
 
def getEupsData (eupsProduct)
 

Public Attributes

 root
 
 eupsProduct
 
 version
 
 doxygen
 
 libs
 
 paths
 
 provides
 

Detailed Description

Base class for defining how to configure an LSST sconsUtils package.

Aliased as lsst.sconsUtils.Configuration.

An ups/*.cfg file should contain an instance of this class called "config". Most LSST packages will be able to use this class directly instead of subclassing it.

The only important method is configure(), which modifies an SCons environment to use the package. If a subclass overrides configure, it may not need to call the base class init(), whose only purpose is to define a number of instance variables used by configure().

Constructor & Destructor Documentation

◆ __init__()

def lsst.sconsUtils.dependencies.Configuration.__init__ (   self,
  cfgFile,
  headers = (),
  libs = None,
  hasSwigFiles = True,
  includeFileDirs = ["include"],
  libFileDirs = ["lib"],
  hasDoxygenInclude = False,
  hasDoxygenTag = True,
  eupsProduct = None 
)

Initialize the configuration object.

Parameters
cfgFileThe name of the calling .cfg file, usually just passed in with the special variable file. This will be parsed to extract the package name and root.
headersA list of headers provided by the package, to be used in autoconf-style tests.
libsA list or dictionary of libraries provided by the package. If a dictionary is provided, libs["main"] should contain a list of regular libraries provided by the library. Other keys are "python" and "test", which refer to libraries that are only linked against compiled Python modules and unit tests, respectively. If a list is provided, the list is used as "main". These are used both for autoconf-style tests and to support env.getLibs(...), which recursively computes the libraries a package must be linked with.
hasSwigFilesIf True, the package provides SWIG interface files in "<root>/python".
hasDoxygenIncludeIf True, the package provides a Doxygen include file with the name "<root>/doc/<name>.inc".
hasDoxygenTagIf True, the package generates a Doxygen TAG file.
includeFileDirsList of directories that should be searched for include files
libFileDirsList of directories that should be searched for libraries
eupsProductName of the EUPS product for the package, if different from the name of the .cfg file.

Referenced by lsst.sconsUtils.dependencies.Configuration.getEupsData().

Member Function Documentation

◆ addCustomTests()

def lsst.sconsUtils.dependencies.Configuration.addCustomTests (   self,
  tests 
)

Add custom SCons configuration tests to the Configure Context passed to the configure() method.

This needs to be done up-front so we can pass in a dictionary of custom tests when calling env.Configure(), and use the same configure context for all packages.

Parameters
testsA dictionary to add custom tests to. This will be passed as the custom_tests argument to env.Configure().

◆ configure()

def lsst.sconsUtils.dependencies.Configuration.configure (   self,
  conf,
  packages,
  check = False,
  build = True 
)

Update an SCons environment to make use of the package.

Parameters
confAn SCons Configure context. The SCons Environment conf.env should be updated by the configure function.
packagesA dictionary containing the configuration modules of all dependencies (or None if the dependency was optional and was not found). The <module>.config.configure(...) method will have already been called on all dependencies.
checkIf True, perform autoconf-style tests to verify that key components are in fact in place.
buildIf True, this is the package currently being built, and packages in "buildRequired" and "buildOptional" dependencies will also be present in the packages dict.

References lsst.sconsUtils.dependencies.Configuration.doxygen, lsst.sconsUtils.dependencies.Configuration.libs, lsst.sconsUtils.dependencies.PackageTree.name, lsst.sconsUtils.dependencies.Configuration.paths, and lsst.sconsUtils.dependencies.Configuration.provides.

◆ getEupsData()

def lsst.sconsUtils.dependencies.Configuration.getEupsData (   eupsProduct)
static

◆ parseFilename()

def lsst.sconsUtils.dependencies.Configuration.parseFilename (   cfgFile)
static

Member Data Documentation

◆ doxygen

lsst.sconsUtils.dependencies.Configuration.doxygen

◆ eupsProduct

lsst.sconsUtils.dependencies.Configuration.eupsProduct

◆ libs

lsst.sconsUtils.dependencies.Configuration.libs

◆ paths

lsst.sconsUtils.dependencies.Configuration.paths

◆ provides

lsst.sconsUtils.dependencies.Configuration.provides

◆ root

lsst.sconsUtils.dependencies.Configuration.root

◆ version

lsst.sconsUtils.dependencies.Configuration.version

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