LSSTApplications  16.0-10-g0ee56ad+4,16.0-11-ga33d1f2+4,16.0-12-g3ef5c14+2,16.0-12-g71e5ef5+17,16.0-12-gbdf3636+2,16.0-13-g118c103+2,16.0-13-g8f68b0a+2,16.0-15-gbf5c1cb+3,16.0-16-gfd17674+2,16.0-17-g7c01f5c+2,16.0-18-g0a50484,16.0-20-ga20f992+7,16.0-21-g0e05fd4+5,16.0-21-g15e2d33+3,16.0-22-g62d8060+3,16.0-22-g847a80f+3,16.0-25-gf00d9b8,16.0-28-g3990c221+3,16.0-3-gf928089+2,16.0-32-g88a4f23+4,16.0-34-gd7987ad+2,16.0-37-gc7333cb+1,16.0-4-g10fc685+1,16.0-4-g18f3627+25,16.0-4-g5f3a788+25,16.0-5-gaf5c3d7+3,16.0-5-gcc1f4bb,16.0-6-g3b92700+3,16.0-6-g4412fcd+2,16.0-6-g7235603+3,16.0-69-g2562ce1b+1,16.0-7-g0913a87,16.0-8-g14ebd58+3,16.0-8-g2df868b,16.0-8-g4cec79c+5,16.0-8-gadf6c7a,16.0-82-g59ec2a54a,16.0-9-g5400cdc+1,16.0-9-ge6233d7+4,master-g2880f2d8cf+2,v17.0.rc1
LSSTDataManagementBasePackage
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
lsst.sconsUtils.dependencies.ExternalConfiguration Class Reference

A Configuration subclass for external (third-party) packages. More...

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

Public Member Functions

def __init__ (self, cfgFile, headers=(), libs=None, 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

A Configuration subclass for external (third-party) packages.

Aliased as lsst.sconsUtils.ExternalConfiguration.

ExternalConfiguration doesn't assume the package uses SWIG or Doxygen, and tells SCons not to consider header files this package provides as dependencies (by setting XCPPPATH instead of CPPPATH). This means things SCons won't waste time looking for changes in it every time you build. Header files in external packages are treated as "system headers": that is, most warnings generated when they are being compiled are suppressed.

Definition at line 287 of file dependencies.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.sconsUtils.dependencies.ExternalConfiguration.__init__ (   self,
  cfgFile,
  headers = (),
  libs = None,
  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.

Definition at line 303 of file dependencies.py.

303  def __init__(self, cfgFile, headers=(), libs=None, eupsProduct=None):
304  Configuration.__init__(self, cfgFile, headers, libs, eupsProduct=eupsProduct, hasSwigFiles=False,
305  hasDoxygenTag=False, hasDoxygenInclude=False)
306  self.paths["XCPPPATH"] = self.paths["CPPPATH"]
307  del self.paths["CPPPATH"]
308 
309 
310 # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
311 
def __init__(self, minimum, dataRange, Q)

Member Function Documentation

◆ addCustomTests()

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

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().

Definition at line 230 of file dependencies.py.

230  def addCustomTests(self, tests):
231  pass
232 

◆ configure()

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

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.

Definition at line 247 of file dependencies.py.

247  def configure(self, conf, packages, check=False, build=True):
248  assert(not (check and build))
249  conf.env.PrependUnique(**self.paths)
250  state.log.info("Configuring package '%s'." % self.name)
251  conf.env.doxygen["includes"].extend(self.doxygen["includes"])
252  if not build:
253  conf.env.doxygen["tags"].extend(self.doxygen["tags"])
254  for target in self.libs:
255  if target not in conf.env.libs:
256  conf.env.libs[target] = self.libs[target].copy()
257  state.log.info("Adding '%s' libraries to target '%s'." % (self.libs[target], target))
258  else:
259  for lib in self.libs[target]:
260  if lib not in conf.env.libs[target]:
261  conf.env.libs[target].append(lib)
262  state.log.info("Adding '%s' library to target '%s'." % (lib, target))
263  if check:
264  for header in self.provides["headers"]:
265  if not conf.CheckCXXHeader(header):
266  return False
267  for lib in self.libs["main"]:
268  if not conf.CheckLib(lib, autoadd=False, language="C++"):
269  return False
270  return True
271 
272 
273 # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
274 
std::shared_ptr< FrameSet > append(FrameSet const &first, FrameSet const &second)
Construct a FrameSet that performs two transformations in series.
Definition: functional.cc:33
def configure(packageName, versionString=None, eupsProduct=None, eupsProductPath=None, noCfgFile=False)
Recursively configure a package using ups/.cfg files.
Definition: dependencies.py:38

◆ getEupsData()

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

Definition at line 129 of file dependencies.py.

129  def getEupsData(eupsProduct):
130  version, eupsPathDir, productDir, table, flavor = eupsForScons.getEups().findSetupVersion(eupsProduct)
131  if productDir is None:
132  productDir = eupsForScons.productDir(eupsProduct)
133  return version, productDir
134 

◆ parseFilename()

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

Definition at line 123 of file dependencies.py.

123  def parseFilename(cfgFile):
124  dir, file = os.path.split(cfgFile)
125  name, ext = os.path.splitext(file)
126  return name, os.path.abspath(os.path.join(dir, ".."))
127 

Member Data Documentation

◆ doxygen

lsst.sconsUtils.dependencies.Configuration.doxygen
inherited

Definition at line 176 of file dependencies.py.

◆ eupsProduct

lsst.sconsUtils.dependencies.Configuration.eupsProduct
inherited

Definition at line 167 of file dependencies.py.

◆ libs

lsst.sconsUtils.dependencies.Configuration.libs
inherited

Definition at line 185 of file dependencies.py.

◆ paths

lsst.sconsUtils.dependencies.Configuration.paths
inherited

Definition at line 197 of file dependencies.py.

◆ provides

lsst.sconsUtils.dependencies.Configuration.provides
inherited

Definition at line 215 of file dependencies.py.

◆ root

lsst.sconsUtils.dependencies.Configuration.root
inherited

Definition at line 164 of file dependencies.py.

◆ version

lsst.sconsUtils.dependencies.Configuration.version
inherited

Definition at line 170 of file dependencies.py.


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