LSSTApplications  16.0-10-g0ee56ad+5,16.0-11-ga33d1f2+5,16.0-12-g3ef5c14+3,16.0-12-g71e5ef5+18,16.0-12-gbdf3636+3,16.0-13-g118c103+3,16.0-13-g8f68b0a+3,16.0-15-gbf5c1cb+4,16.0-16-gfd17674+3,16.0-17-g7c01f5c+3,16.0-18-g0a50484+1,16.0-20-ga20f992+8,16.0-21-g0e05fd4+6,16.0-21-g15e2d33+4,16.0-22-g62d8060+4,16.0-22-g847a80f+4,16.0-25-gf00d9b8+1,16.0-28-g3990c221+4,16.0-3-gf928089+3,16.0-32-g88a4f23+5,16.0-34-gd7987ad+3,16.0-37-gc7333cb+2,16.0-4-g10fc685+2,16.0-4-g18f3627+26,16.0-4-g5f3a788+26,16.0-5-gaf5c3d7+4,16.0-5-gcc1f4bb+1,16.0-6-g3b92700+4,16.0-6-g4412fcd+3,16.0-6-g7235603+4,16.0-69-g2562ce1b+2,16.0-8-g14ebd58+4,16.0-8-g2df868b+1,16.0-8-g4cec79c+6,16.0-8-gadf6c7a+1,16.0-8-gfc7ad86,16.0-82-g59ec2a54a+1,16.0-9-g5400cdc+2,16.0-9-ge6233d7+5,master-g2880f2d8cf+3,v17.0.rc1
LSSTDataManagementBasePackage
Functions | Variables
lsstimport Namespace Reference

Functions

def imp_load_module (name, args)
 

Variables

tuple SHARED_LIB_EXTENSION_LIST = ('.so', '.dylib')
 
tuple LIB_EXCEPTION_LIST = ('_lsstcppimport.so',)
 
 RTLD_GLOBAL = None
 
 RTLD_NOW = None
 
tuple options = ('os', 'DLFCN', 'ctypes')
 
 m = importlib.import_module(mod)
 
 DLFLAGS = RTLD_GLOBAL | RTLD_NOW
 
 orig_imp_load_module = imp.load_module
 
 load_module
 
 file
 

Function Documentation

◆ imp_load_module()

def lsstimport.imp_load_module (   name,
  args 
)

Definition at line 88 of file lsstimport.py.

88  def imp_load_module(name, *args):
89  pathParts = args[1].split(os.path.sep)
90  extension = os.path.splitext(pathParts[-1])[-1]
91  # Find all swigged LSST libs. Load _lsstcppimport.so by
92  # adding it to the EXCEPTIONLIST since it may not have lsst in
93  # the path (it's in $BASE_DIR/python, not
94  # $BASE_DIR/python/lsst). Also, look for paths that look like
95  # python/lsst as that is how to know if you are in an LSST
96  # package.
97  lsstIdx = [i for i, el in enumerate(pathParts) if el == 'python']
98  if pathParts[-1] in LIB_EXCEPTION_LIST or (extension in SHARED_LIB_EXTENSION_LIST and
99  pathParts[-1].startswith('_') and
100  'lsst' in [pathParts[i + 1] for i in lsstIdx]):
101  # Get currently set flags
102  originalDLFlags = sys.getdlopenflags()
103  # Set flags
104  sys.setdlopenflags(DLFLAGS)
105  try:
106  module = orig_imp_load_module(name, *args)
107  finally:
108  # Set original flags
109  sys.setdlopenflags(originalDLFlags)
110  else:
111  module = orig_imp_load_module(name, *args)
112  return module
orig_imp_load_module
Definition: lsstimport.py:85
def imp_load_module(name, args)
Definition: lsstimport.py:88

Variable Documentation

◆ DLFLAGS

lsstimport.DLFLAGS = RTLD_GLOBAL | RTLD_NOW

Definition at line 71 of file lsstimport.py.

◆ file

lsstimport.file

Definition at line 130 of file lsstimport.py.

◆ LIB_EXCEPTION_LIST

tuple lsstimport.LIB_EXCEPTION_LIST = ('_lsstcppimport.so',)

Definition at line 39 of file lsstimport.py.

◆ load_module

lsstimport.load_module

Definition at line 113 of file lsstimport.py.

◆ m

lsstimport.m = importlib.import_module(mod)

Definition at line 50 of file lsstimport.py.

◆ options

tuple lsstimport.options = ('os', 'DLFCN', 'ctypes')

Definition at line 47 of file lsstimport.py.

◆ orig_imp_load_module

lsstimport.orig_imp_load_module = imp.load_module

Definition at line 85 of file lsstimport.py.

◆ RTLD_GLOBAL

lsstimport.RTLD_GLOBAL = None

Definition at line 43 of file lsstimport.py.

◆ RTLD_NOW

int lsstimport.RTLD_NOW = None

Definition at line 44 of file lsstimport.py.

◆ SHARED_LIB_EXTENSION_LIST

tuple lsstimport.SHARED_LIB_EXTENSION_LIST = ('.so', '.dylib')

Definition at line 38 of file lsstimport.py.