lsst.sconsUtils  14.0-10-ga389a9f
Static Public Member Functions | List of all members
lsst.sconsUtils.scripts.BasicSConscript Class Reference

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

Inheritance diagram for lsst.sconsUtils.scripts.BasicSConscript:

Static Public Member Functions

def lib (libName=None, src=None, libs="self", noBuildList=None)
 Convenience function to replace standard lib/SConscript boilerplate. More...
 
def shebang (src=None)
 Handles shebang rewriting. More...
 
def python (swigNameList=None, libs="main python", swigSrc=None)
 Convenience function to replace standard python/*/SConscript boilerplate. More...
 
def pybind11 (nameList=[], libs="main python", extraSrc=None, addUnderscore=True)
 Convenience function to replace standard python/*/SConscript boilerplate. More...
 
def doc (config="doxygen.conf.in", projectName=None, projectNumber=None, kw)
 Convenience function to replace standard doc/SConscript boilerplate. More...
 
def tests (pyList=None, ccList=None, swigNameList=None, swigSrc=None, ignoreList=None, noBuildList=None, pySingles=None, args=None)
 Convenience function to replace standard tests/SConscript boilerplate. More...
 
def examples (ccList=None, swigNameList=None, swigSrc=None)
 Convenience function to replace standard examples/SConscript boilerplate. More...
 

Detailed Description

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

All methods of BasicSConscript are static. All of these functions update the state.targets dictionary of targets used to set default targets and fix build dependencies; if you build anything without using BasicSConscript methods, be sure to manually it to the state.targets dict.

Member Function Documentation

◆ doc()

def lsst.sconsUtils.scripts.BasicSConscript.doc (   config = "doxygen.conf.in",
  projectName = None,
  projectNumber = None,
  kw 
)
static

Convenience function to replace standard doc/SConscript boilerplate.

With no arguments, this will generate a Doxygen config file and run Doxygen with env.Doxygen(), using the projectName and projectNumber from env["packageName"] and env["version"], respectively.

This essentially just forwards all arguments (which should be passed as keyword arguments) to env.Doxygen().

References lsst.sconsUtils.scripts.BasicSConscript.tests().

◆ examples()

def lsst.sconsUtils.scripts.BasicSConscript.examples (   ccList = None,
  swigNameList = None,
  swigSrc = None 
)
static

Convenience function to replace standard examples/SConscript boilerplate.

Parameters
ccListA sequence of C++ examples to build (including .cc extensions). Defaults to a *.cc glob of the examples directory, minus any files that end with *_wrap.cc and files present in swigSrc.
swigNameListA sequence of SWIG modules to build (NOT including .i extensions).
swigSrcAdditional source files to be compiled into SWIG modules, as a dictionary; each key must be an entry in swigNameList, and each value a list of additional source files.

◆ lib()

def lsst.sconsUtils.scripts.BasicSConscript.lib (   libName = None,
  src = None,
  libs = "self",
  noBuildList = None 
)
static

Convenience function to replace standard lib/SConscript boilerplate.

With no arguments, this will build a shared library with the same name as the package. This uses env.SourcesForSharedLibrary to support the optFiles/noOptFiles command-line variables.

Parameters
libNameName of the shared libray to be built (defaults to env["packageName"]).
srcSource to compile into the library. Defaults to a 4-directory deep glob of all *.cc files in #src.
libsLibraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in.
noBuildListList of source files to exclude from building.

◆ pybind11()

def lsst.sconsUtils.scripts.BasicSConscript.pybind11 (   nameList = [],
  libs = "main python",
  extraSrc = None,
  addUnderscore = True 
)
static

Convenience function to replace standard python/*/SConscript boilerplate.

Returns
A list of Pybind11LoadableModule elements.
Parameters
nameListSequence of pybind11 modules to be built (does not include the file extensions).
libsLibraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in.
extraSrcA dictionary of additional source files that go into the modules. Each key should be an entry in nameList, and each value should be a list of additional C++ source files.
addUnderscoreAdd an underscore to each library name (if the source file name does not already start with underscore)? If false the library name is always the same as the source file name DEPRECATED: always use False for new code.

◆ python()

def lsst.sconsUtils.scripts.BasicSConscript.python (   swigNameList = None,
  libs = "main python",
  swigSrc = None 
)
static

Convenience function to replace standard python/*/SConscript boilerplate.

With no arguments, this will build a SWIG module with the name determined according to our current pseudo-convention: last part of env["packageName"], split by underscores, with "Lib" appended to the end.

Returns
A list of SwigLoadableModule elements.
Parameters
swigNameListSequence of SWIG modules to be built (does not include the file extensions).
libsLibraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in.
swigSrcA dictionary of additional source files that go into the modules. Each key should be an entry in swigNameList, and each value should be a list of additional C++ source files not generated by SWIG.

◆ shebang()

def lsst.sconsUtils.scripts.BasicSConscript.shebang (   src = None)
static

Handles shebang rewriting.

With no arguments looks in bin.src/ and copies to bin/ If utils.needShebangRewrite() is False the shebang will not be modified.

Only Python files requiring a shebang rewrite should be placed in bin.src/ Do not place executable binaries in this directory.

Parameters
srcOverride the source list

◆ tests()

def lsst.sconsUtils.scripts.BasicSConscript.tests (   pyList = None,
  ccList = None,
  swigNameList = None,
  swigSrc = None,
  ignoreList = None,
  noBuildList = None,
  pySingles = None,
  args = None 
)
static

Convenience function to replace standard tests/SConscript boilerplate.

With no arguments, will attempt to figure out which files should be run as tests and which are support code (like SWIG modules).

Python tests will be marked as dependent on the entire #python directory and any SWIG modules built in the tests directory. This should ensure tests are always run when their results might have changed, but may result in them being re-run more often than necessary.

Parameters
pyListA sequence of Python tests to run (including .py extensions). Defaults to a *.py glob of the tests directory, minus any files corresponding to the SWIG modules in swigFileList. An empty list will enable automated test discovery.
pySinglesA sequence of Python tests to run (including .py extensions) as independent single tests. By default this list is empty and all tests are run in a single pytest call. Items specified here will not appear in the default pyList and should not start with "test_" (such that they will not be auto-discoverable by pytest).
ccListA sequence of C++ unit tests to run (including .cc extensions). Defaults to a *.cc glob of the tests directory, minus any files that end with *_wrap.cc and files present in swigSrc.
swigNameListA sequence of SWIG modules to build (NOT including .i extensions).
swigSrcAdditional source files to be compiled into SWIG modules, as a dictionary; each key must be an entry in swigNameList, and each value a list of additional source files.
ignoreListList of ignored tests to be passed to tests.Control (note that ignored tests will be built, but not run).
nobuildListList of tests that should not even be built.
argsA dictionary of program arguments for tests, passed directly to tests.Control.

Referenced by lsst.sconsUtils.scripts.BasicSConscript.doc().


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