LSSTApplications  17.0+11,17.0+34,17.0+56,17.0+57,17.0+59,17.0+7,17.0-1-g377950a+33,17.0.1-1-g114240f+2,17.0.1-1-g4d4fbc4+28,17.0.1-1-g55520dc+49,17.0.1-1-g5f4ed7e+52,17.0.1-1-g6dd7d69+17,17.0.1-1-g8de6c91+11,17.0.1-1-gb9095d2+7,17.0.1-1-ge9fec5e+5,17.0.1-1-gf4e0155+55,17.0.1-1-gfc65f5f+50,17.0.1-1-gfc6fb1f+20,17.0.1-10-g87f9f3f+1,17.0.1-11-ge9de802+16,17.0.1-16-ga14f7d5c+4,17.0.1-17-gc79d625+1,17.0.1-17-gdae4c4a+8,17.0.1-2-g26618f5+29,17.0.1-2-g54f2ebc+9,17.0.1-2-gf403422+1,17.0.1-20-g2ca2f74+6,17.0.1-23-gf3eadeb7+1,17.0.1-3-g7e86b59+39,17.0.1-3-gb5ca14a,17.0.1-3-gd08d533+40,17.0.1-30-g596af8797,17.0.1-4-g59d126d+4,17.0.1-4-gc69c472+5,17.0.1-6-g5afd9b9+4,17.0.1-7-g35889ee+1,17.0.1-7-gc7c8782+18,17.0.1-9-gc4bbfb2+3,w.2019.22
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.