def setup_lib_paths(fbdir, libdir):
"""This is a little bit of a hack, but it should work. If we detect that the EDFLIB_DIR is
not in LD_LIBRARY_PATH, restart after adding it.
"""
try:
libpath = os.environ['LD_LIBRARY_PATH']
except KeyError:
libpath = ""
if not (sys.platform == "win32") and (libdir not in libpath):
# To get the Fuzzbunch environment setup properly, we need to modify LD_LIBRARY_PATH.
# To do that, we need to rerun Fuzzbunch so that it picks up the new LD_LIBRARY_PATH
os.environ['LD_LIBRARY_PATH'] = "%s:%s" % (libdir,libpath)
#path = os.path.abspath(fbdir)
#args = ['"' + path + '"'] + sys.argv[1:]
#os.execvpe( 'python', ['python']+sys.argv, os.environ)
评论列表
文章目录