Configuration¶
- 
class lsst.sconsUtils.dependencies.Configuration(cfgFile, headers=(), libs=None, hasSwigFiles=True, includeFileDirs=['include'], libFileDirs=['lib'], hasDoxygenInclude=False, hasDoxygenTag=True, eupsProduct=None)¶
- Bases: - object- Base class for defining how to configure an LSST sconsUtils package. - Aliased as - lsst.sconsUtils.Configuration.- An - ups/*.cfgfile 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().- Parameters: - cfgFile : str
- The 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.
- headers : listofstr, optional
- A list of headers provided by the package, to be used in autoconf-style tests. 
- libs : listordict, optional
- A 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.
- hasSwigFiles : bool, optional
- If True, the package provides SWIG interface files in - <root>/python.
- hasDoxygenInclude : bool, optional
- If True, the package provides a Doxygen include file with the name - <root>/doc/<name>.inc.
- hasDoxygenTag : bool, optional
- If True, the package generates a Doxygen TAG file. 
- includeFileDirs : list, optional
- List of directories that should be searched for include files. 
- libFileDirs : list, optional
- List of directories that should be searched for libraries. 
- eupsProduct : str
- Name of the EUPS product for the package, if different from the name of the - .cfgfile.
 - Methods Summary - addCustomTests(tests)- Add custom SCons configuration tests to the Configure Context passed to the configure() method. - configure(conf, packages[, check, build])- Update an SCons environment to make use of the package. - getEupsData(eupsProduct)- Get EUPS version and product directory for named product. - parseFilename(cfgFile)- Parse the name of a .cfg file and return package name and root. - Methods Documentation - 
addCustomTests(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: - tests : dict
- A dictionary to add custom tests to. This will be passed as the custom_tests argument to - env.Configure().
 
- tests : 
 - 
configure(conf, packages, check=False, build=True)¶
- Update an SCons environment to make use of the package. - Parameters: - conf : SCons.Configure
- An SCons Configure context. The SCons Environment conf.env should be updated by the configure function. 
- packages : dict
- A dictionary containing the configuration modules of all dependencies (or - Noneif the dependency was optional and was not found). The- <module>.config.configure(...)method will have already been called on all dependencies.
- check : bool, optional
- If True, perform autoconf-style tests to verify that key components are in fact in place. 
- build : bool, optional
- If True, this is the package currently being built, and packages in “buildRequired” and “buildOptional” dependencies will also be present in the packages dict. 
 
- conf : 
 
- cfgFile :