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
|
Classes | |
class | Log |
A dead-simple logger for all messages. More... | |
Functions | |
def | libraryPathPassThrough () |
Returns name of library path environment variable to be passed through or else returns None if no pass through is required on this platform. More... | |
def | whichPython () |
Returns the full path to the Python executable as determined from the PATH. More... | |
def | needShebangRewrite () |
Returns True if the shebang lines of executables should be rewritten. More... | |
def | libraryLoaderEnvironment () |
Returns library loader path environment string to be prepended to external commands Will be "" if nothing is required. More... | |
def | runExternal (cmd, fatal=False, msg=None) |
Safe wrapper for running external programs, reading stdout, and sanitizing error messages. More... | |
def | memberOf (cls, name=None) |
A Python decorator that injects functions into a class. More... | |
def lsst.sconsUtils.utils.libraryLoaderEnvironment | ( | ) |
Returns library loader path environment string to be prepended to external commands Will be "" if nothing is required.
If we have an OS X with System Integrity Protection enabled or similar we need to pass through both DYLD_LIBRARY_PATH and LSST_LIBRARY_PATH to the external command. DYLD_LIBRARY_PATH for Python code LSST_LIBRARY_PATH for shell scripts
If both are already defined then pass them each through If only one is defined, then set both to the defined env variable If neither is defined then pass through nothing.
Definition at line 116 of file utils.py.
def lsst.sconsUtils.utils.libraryPathPassThrough | ( | ) |
Returns name of library path environment variable to be passed through or else returns None if no pass through is required on this platform.
Definition at line 70 of file utils.py.
def lsst.sconsUtils.utils.memberOf | ( | cls, | |
name = None |
|||
) |
A Python decorator that injects functions into a class.
For example:
...will cause test_method to appear as as if it were defined within test_class.
The function or method will still be added to the module scope as well, replacing any existing module-scope function with that name; this appears to be unavoidable.
Definition at line 185 of file utils.py.
def lsst.sconsUtils.utils.needShebangRewrite | ( | ) |
Returns True if the shebang lines of executables should be rewritten.
Definition at line 98 of file utils.py.
def lsst.sconsUtils.utils.runExternal | ( | cmd, | |
fatal = False , |
|||
msg = None |
|||
) |
Safe wrapper for running external programs, reading stdout, and sanitizing error messages.
Command can be given as a list/tuple of command with separate options.
Note that the entire program output is returned, not just a single line.
Definition at line 144 of file utils.py.
def lsst.sconsUtils.utils.whichPython | ( | ) |
Returns the full path to the Python executable as determined from the PATH.
Does not return the full path of the Python running SCons. Caches result and assumes the PATH does not change between calls. Runs the "python" command and asks where it is rather than scanning the PATH.
Definition at line 87 of file utils.py.