lsst.sconsUtils  16.0-9-g681d1af
Public Member Functions | Static Public Member Functions | List of all members
lsst.sconsUtils.scripts.BasicSConstruct Class Reference

A scope-only class for SConstruct-replacement convenience functions. More...

Public Member Functions

def __new__ (cls, packageName, versionString=None, eupsProduct=None, eupsProductPath=None, cleanExt=None, defaultTargets=DEFAULT_TARGETS, subDirList=None, ignoreRegex=None, versionModuleName="python/lsst/%s/version.py", noCfgFile=False, sconscriptOrder=None, disableCc=False)
 Convenience function to replace standard SConstruct boilerplate. More...
 
def initialize (cls, packageName, versionString=None, eupsProduct=None, eupsProductPath=None, cleanExt=None, versionModuleName="python/lsst/%s/version.py", noCfgFile=False, sconscriptOrder=None, disableCc=False)
 Convenience function to replace standard SConstruct boilerplate (step 1). More...
 

Static Public Member Functions

def finish (defaultTargets=DEFAULT_TARGETS, subDirList=None, ignoreRegex=None)
 Convenience function to replace standard SConstruct boilerplate (step 2). More...
 

Detailed Description

A scope-only class for SConstruct-replacement convenience functions.

The boilerplate for a standard LSST SConstruct file is replaced by two static methods: initialize() and finish(). The former configures dependencies, sets up package-dependent environment variables, and calls any SConscript files found in subdirectories, while the latter sets up installation paths, default targets, and explicit dependencies.

Calling BasicSConstruct as a function invokes its new method, which calls both initialize() and finish(), and should be used when the SConstruct file doesn't need to do anything other than what they provide.

Member Function Documentation

◆ __new__()

def lsst.sconsUtils.scripts.BasicSConstruct.__new__ (   cls,
  packageName,
  versionString = None,
  eupsProduct = None,
  eupsProductPath = None,
  cleanExt = None,
  defaultTargets = DEFAULT_TARGETS,
  subDirList = None,
  ignoreRegex = None,
  versionModuleName = "python/lsst/%s/version.py",
  noCfgFile = False,
  sconscriptOrder = None,
  disableCc = False 
)

Convenience function to replace standard SConstruct boilerplate.

This is a shortcut for

BasicSConstruct.initialize(...)
BasicSConstruct.finalize(...)

This returns the sconsUtils.env Environment object rather than a BasicSConstruct instance (which would be useless).

References lsst.sconsUtils.scripts.BasicSConstruct.finish(), and lsst.sconsUtils.scripts.BasicSConstruct.initialize().

◆ finish()

def lsst.sconsUtils.scripts.BasicSConstruct.finish (   defaultTargets = DEFAULT_TARGETS,
  subDirList = None,
  ignoreRegex = None 
)
static

Convenience function to replace standard SConstruct boilerplate (step 2).

This function:

  • Sets up installation paths.
  • Tells SCons to only do MD5 checks when timestamps have changed.
  • Sets the "include", "lib", "python", and "tests" targets as the defaults to be built when scons is run with no target arguments.
Parameters
subDirListAn explicit list of subdirectories that should be installed. By default, all non-hidden subdirectories will be installed.
defaultTargetsA sequence of targets (see state.targets) that should be built when scons is run with no arguments.
ignoreRegexRegular expression that matches files that should not be installed.
Returns
an SCons Environment object (which is also available as lsst.sconsUtils.env).

Referenced by lsst.sconsUtils.scripts.BasicSConstruct.__new__(), and lsst.sconsUtils.scripts.BasicSConstruct.initialize().

◆ initialize()

def lsst.sconsUtils.scripts.BasicSConstruct.initialize (   cls,
  packageName,
  versionString = None,
  eupsProduct = None,
  eupsProductPath = None,
  cleanExt = None,
  versionModuleName = "python/lsst/%s/version.py",
  noCfgFile = False,
  sconscriptOrder = None,
  disableCc = False 
)

Convenience function to replace standard SConstruct boilerplate (step 1).

This function:

  • Calls all SConscript files found in subdirectories.
  • Configures dependencies.
  • Sets how the –clean option works.
Parameters
packageNameName of the package being built; must correspond to a .cfg file in ups/.
versionStringVersion-control system string to be parsed for version information ($HeadURL$ for SVN). Defaults to "git" if not set or None.
eupsProductName of the EUPS product being built. Defaults to and is almost always the name of the package.
eupsProductPathAn alternate directory where the package should be installed.
cleanExtWhitespace delimited sequence of globs for files to remove with –clean.
versionModuleNameIf non-None, builds a version.py module as this file; 's' is replaced with the name of the package.
noCfgFileIf True, this package has no .cfg file
sconscriptOrderA sequence of directory names that set the order for processing SConscript files discovered in nested directories. Full directories need not be specified, but paths must begin at the root. For example, ["lib", "python"] will ensure that "lib/SConscript" is run before both "python/foo/SConscript" and "python/bar/SConscript". The default order should work for most LSST SCons builds, as it provides the correct ordering for the lib, python, tests, examples, and doc targets. If this argument is provided, it must include the subset of that list that is valid for the package, in that order.
disableCCShould the C++ compiler check be disabled? Disabling this check allows a faster startup and permits building on systems that don't meet the requirements for the C++ compilter (e.g., for pure-python packages).
Returns
an SCons Environment object (which is also available as lsst.sconsUtils.env).

References lsst.sconsUtils.scripts.BasicSConstruct._initializing, and lsst.sconsUtils.scripts.BasicSConstruct.finish().

Referenced by lsst.sconsUtils.scripts.BasicSConstruct.__new__().


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