lsst.sconsUtils  16.0-14-g280d363
Classes | Functions
lsst.sconsUtils.builders Namespace Reference

Classes

class  DoxygenBuilder
 A callable to be used as an SCons Action to run Doxygen. More...
 

Functions

def SharedLibraryIncomplete (self, target, source, keywords)
 
def Pybind11LoadableModule (self, target, source, keywords)
 
def SourcesForSharedLibrary (self, files)
 Prepare the list of files to be passed to a SharedLibrary constructor. More...
 
def filesToTag (root=None, fileRegex=None, ignoreDirs=None)
 
def BuildETags (env, root=None, fileRegex=None, ignoreDirs=None)
 Build Emacs tags (see man etags for more information). More...
 
def CleanTree (self, filePatterns, dirPatterns="", directory=".", verbose=False)
 Remove files matching the argument list starting at directory when scons is invoked with -c/–clean and no explicit targets are listed. More...
 
def ProductDir (env, product)
 
def Doxygen (self, config, kw)
 Generate a Doxygen config file and run Doxygen on it. More...
 
def VersionModule (self, filename, versionString=None)
 

Function Documentation

◆ BuildETags()

def lsst.sconsUtils.builders.BuildETags (   env,
  root = None,
  fileRegex = None,
  ignoreDirs = None 
)

Build Emacs tags (see man etags for more information).

Files are chosen if they match fileRegex; toplevel directories in list ignoreDirs are ignored This routine won't do anything unless you specified a "TAGS" target

References lsst.sconsUtils.builders.filesToTag(), and lsst.sconsUtils.utils.memberOf().

◆ CleanTree()

def lsst.sconsUtils.builders.CleanTree (   self,
  filePatterns,
  dirPatterns = "",
  directory = ".",
  verbose = False 
)

Remove files matching the argument list starting at directory when scons is invoked with -c/–clean and no explicit targets are listed.

E.g. CleanTree(r"*~ core")

dirPatterns allows the specification of directories to be removed If verbose is True, print each filename after deleting it

References lsst.sconsUtils.utils.memberOf().

◆ Doxygen()

def lsst.sconsUtils.builders.Doxygen (   self,
  config,
  kw 
)

Generate a Doxygen config file and run Doxygen on it.

Rather than parse a complete Doxygen config file for SCons sources and targets, this Doxygen builder builds a Doxygen config file, adding INPUT, FILE_PATTERNS, RECUSRIVE, EXCLUDE, XX_OUTPUT and GENERATE_XX options (and possibly others) to an existing proto-config file. Generated settings will override those in the proto-config file.

Parameters
configA Doxygen config file, usually with the extension .conf.in; a new file with the .in removed will be generated and passed to Doxygen. Settings in the original config file will be overridden by those generated by this method.
inputsA sequence of folders or files to be passed as the INPUT setting for Doxygen. This list will be turned into absolute paths by SCons, so the "#folder" syntax will work. Otherwise, the list is passed in as-is, but the builder will also examine those directories to find which source files the Doxygen output actually depends on.
patternsA sequence of glob patterns for the FILE_PATTERNS Doxygen setting. This will be passed directly to Doxygen, but it is also used to determine which source files should be considered dependencies.
recursiveWhether the inputs should be searched recursively (used for the Doxygen RECURSIVE setting).
outputsA sequence of output formats which will also be used as output directories.
excludeA sequence of folders or files (not globs) to be ignored by Doxygen (the Doxygen EXCLUDE setting). Hidden directories are automatically ignored.
includesA sequence of Doxygen config files to include. These will automatically be separated into paths and files to fill in the @INCLUDE_PATH and @INCLUDE settings.
useTagsA sequence of Doxygen tag files to use. It will be assumed that the html directory for each tag file is in an "html" subdirectory in the same directory as the tag file.
makeTagA string indicating the name of a tag file to be generated.
projectNameSets the Doxygen PROJECT_NAME setting.
projectNumberSets the Doxygen PROJECT_NUMBER setting.
excludeSwigIf True (default), looks for SWIG .i files in the input directories and adds Python and C++ files generated by SWIG to the list of files to exclude. For this to work, the SWIG-generated filenames must be the default ones ("module.i" generates "module.py" and "moduleLib_wrap.cc").
Note
When building documentation from a clean source tree, generated source files (like headers generated with M4) will not be included among the dependencies, because they aren't present when we walk the input folders. The workaround is just to build the docs after building the source.

References lsst.sconsUtils.utils.memberOf().

◆ filesToTag()

def lsst.sconsUtils.builders.filesToTag (   root = None,
  fileRegex = None,
  ignoreDirs = None 
)

◆ ProductDir()

def lsst.sconsUtils.builders.ProductDir (   env,
  product 
)

◆ Pybind11LoadableModule()

def lsst.sconsUtils.builders.Pybind11LoadableModule (   self,
  target,
  source,
  keywords 
)

◆ SharedLibraryIncomplete()

def lsst.sconsUtils.builders.SharedLibraryIncomplete (   self,
  target,
  source,
  keywords 
)

◆ SourcesForSharedLibrary()

def lsst.sconsUtils.builders.SourcesForSharedLibrary (   self,
  files 
)

Prepare the list of files to be passed to a SharedLibrary constructor.

In particular, ensure that any files listed in env.NoOptFiles (set by the command line option noOptFile="file1 file2") are built without optimisation and files listed in env.optFiles are built with optimisation

The usage pattern in an SConscript file is: ccFiles = env.SourcesForSharedLibrary(Glob("../src/*/*.cc")) env.SharedLibrary('afw', ccFiles, LIBS=env.getLibs("self")))

This is automatically used by scripts.BasicSConscript.lib().

◆ VersionModule()

def lsst.sconsUtils.builders.VersionModule (   self,
  filename,
  versionString = None 
)