A scope-only class for SConscript-replacement convenience functions.
More...
|
def | lib |
| Convenience function to replace standard lib/SConscript boilerplate. More...
|
|
def | shebang |
| Handles shebang rewriting. More...
|
|
def | python |
| Convenience function to replace standard python/*/SConscript boilerplate. More...
|
|
def | pybind11 |
| Convenience function to replace standard python/*/SConscript boilerplate. More...
|
|
def | doc |
| Convenience function to replace standard doc/SConscript boilerplate. More...
|
|
def | tests |
| Convenience function to replace standard tests/SConscript boilerplate. More...
|
|
def | examples |
| Convenience function to replace standard examples/SConscript boilerplate. More...
|
|
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.
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().
def lsst.sconsUtils.scripts.BasicSConscript.examples |
( |
|
ccList = None , |
|
|
|
swigNameList = None , |
|
|
|
swigSrc = None |
|
) |
| |
|
static |
Convenience function to replace standard examples/SConscript boilerplate.
- Parameters
-
ccList | A 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. |
swigNameList | A sequence of SWIG modules to build (NOT including .i extensions). |
swigSrc | Additional 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. |
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
-
libName | Name of the shared libray to be built (defaults to env["packageName"]). |
src | Source to compile into the library. Defaults to a 4-directory deep glob of all *.cc files in #src. |
libs | Libraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in. |
noBuildList | List of source files to exclude from building. |
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
-
nameList | Sequence of pybind11 modules to be built (does not include the file extensions). |
libs | Libraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in. |
extraSrc | A 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. |
addUnderscore | Add 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. |
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
-
swigNameList | Sequence of SWIG modules to be built (does not include the file extensions). |
libs | Libraries to link against, either as a string argument to be passed to env.getLibs() or a sequence of actual libraries to pass in. |
swigSrc | A 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. |
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
-
src | Override the source list |
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
-
pyList | A 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. |
pySingles | A 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). |
ccList | A 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. |
swigNameList | A sequence of SWIG modules to build (NOT including .i extensions). |
swigSrc | Additional 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. |
ignoreList | List of ignored tests to be passed to tests.Control (note that ignored tests will be built, but not run). |
nobuildList | List of tests that should not even be built. |
args | A 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: