本文整理汇总了Python中utilsOsType.determine_os_type函数的典型用法代码示例。如果您正苦于以下问题:Python determine_os_type函数的具体用法?Python determine_os_type怎么用?Python determine_os_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了determine_os_type函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: make_symlink_native
def make_symlink_native(vDictArgs, strSrc, strTarget):
eOSType = utilsOsType.determine_os_type()
bDbg = "-d" in vDictArgs
bOk = True
strErrMsg = ""
target_filename = os.path.basename(strTarget)
if eOSType == utilsOsType.EnumOsType.Unknown:
bOk = False
strErrMsg = strErrMsgOsTypeUnknown
elif eOSType == utilsOsType.EnumOsType.Windows:
if bDbg:
print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
bOk, strErrMsg = make_symlink_windows(strSrc,
strTarget)
else:
if os.path.islink(strTarget):
if bDbg:
print((strMsgSymlinkExists % target_filename))
return (bOk, strErrMsg)
if bDbg:
print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
bOk, strErrMsg = make_symlink_other_platforms(strSrc,
strTarget)
return (bOk, strErrMsg)
开发者ID:krytarowski,项目名称:lldb,代码行数:26,代码来源:finishSwigPythonLLDB.py
示例2: make_symlink
def make_symlink(
vDictArgs,
vstrFrameworkPythonDir,
vstrSrcFile,
vstrTargetFile):
dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink()")
bOk = True
strErrMsg = ""
bDbg = "-d" in vDictArgs
strTarget = os.path.join(vstrFrameworkPythonDir, vstrTargetFile)
strTarget = os.path.normcase(strTarget)
strSrc = ""
os.chdir(vstrFrameworkPythonDir)
bMakeFileCalled = "-m" in vDictArgs
eOSType = utilsOsType.determine_os_type()
if not bMakeFileCalled:
strBuildDir = os.path.join("..", "..", "..")
else:
# Resolve vstrSrcFile path relatively the build directory
if eOSType == utilsOsType.EnumOsType.Windows:
# On a Windows platform the vstrFrameworkPythonDir looks like:
# llvm\\build\\Lib\\site-packages\\lldb
strBuildDir = os.path.join("..", "..", "..")
else:
# On a UNIX style platform the vstrFrameworkPythonDir looks like:
# llvm/build/lib/python2.7/site-packages/lldb
strBuildDir = os.path.join("..", "..", "..", "..")
strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
return make_symlink_native(vDictArgs, strSrc, strTarget)
开发者ID:krytarowski,项目名称:lldb,代码行数:31,代码来源:finishSwigPythonLLDB.py
示例3: main
def main(vArgv):
dbg = utilsDebug.CDebugFnVerbose("main()")
bOk = False
dictArgs = {}
nResult = 0
strMsg = ""
# The validate arguments fn will exit the program if tests fail
nResult, dictArgs = validate_arguments(vArgv)
eOSType = utilsOsType.determine_os_type()
if eOSType == utilsOsType.EnumOsType.Unknown:
program_exit(-4, strMsgErrorOsTypeUnknown)
global gbDbgFlag
gbDbgFlag = "-d" in dictArgs
if gbDbgFlag:
print_out_input_parameters(dictArgs)
# Check to see if we were called from the Makefile system. If we were, check
# if the caller wants SWIG to generate a dependency file.
# Not used in this program, but passed through to the language script file
# called by this program
global gbMakeFileFlag
global gbSwigGenDepFileFlag
gbMakeFileFlag = "-m" in dictArgs
gbSwigGenDepFileFlag = "-M" in dictArgs
bOk, strMsg = check_lldb_swig_file_exists(dictArgs["--srcRoot"], eOSType)
if bOk == False:
program_exit(-3, strMsg)
nResult, strMsg = run_swig_for_each_script_supported(dictArgs)
program_exit(nResult, strMsg)
开发者ID:Nomad280279,项目名称:lldb,代码行数:35,代码来源:buildSwigWrapperClasses.py
示例4: create_symlinks
def create_symlinks(vDictArgs, vstrFrameworkPythonDir, vstrLldbLibDir):
dbg = utilsDebug.CDebugFnVerbose("Python script create_symlinks()")
bOk = True
strErrMsg = ""
eOSType = utilsOsType.determine_os_type()
# Make symlink for _lldb
strLibLldbFileName = "_lldb"
if bOk:
bOk, strErrMsg = make_symlink_liblldb(vDictArgs,
vstrFrameworkPythonDir,
strLibLldbFileName,
vstrLldbLibDir)
# Make symlink for darwin-debug on Darwin
strDarwinDebugFileName = "darwin-debug"
if bOk and eOSType == utilsOsType.EnumOsType.Darwin:
bOk, strErrMsg = make_symlink_darwin_debug(vDictArgs,
vstrFrameworkPythonDir,
strDarwinDebugFileName)
# Make symlink for lldb-argdumper
strArgdumperFileName = "lldb-argdumper"
if bOk:
bOk, strErrMsg = make_symlink_lldb_argdumper(vDictArgs,
vstrFrameworkPythonDir,
strArgdumperFileName)
return (bOk, strErrMsg)
开发者ID:krytarowski,项目名称:lldb,代码行数:29,代码来源:finishSwigPythonLLDB.py
示例5: make_symlink_liblldb
def make_symlink_liblldb(vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName):
dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink_liblldb()")
bOk = True
strErrMsg = ""
strTarget = vstrLiblldbFileName
strSrc = ""
eOSType = utilsOsType.determine_os_type()
if eOSType == utilsOsType.EnumOsType.Windows:
# When importing an extension module using a debug version of python, you
# write, for example, "import foo", but the interpreter searches for
# "foo_d.pyd"
if is_debug_interpreter():
strTarget += "_d"
strTarget += ".pyd"
else:
strTarget += ".so"
bMakeFileCalled = "-m" in vDictArgs
if not bMakeFileCalled:
strSrc = os.path.join("lib", "LLDB")
else:
strLibFileExtn = ""
if eOSType == utilsOsType.EnumOsType.Windows:
strSrc = os.path.join("bin", "liblldb.dll")
else:
if eOSType == utilsOsType.EnumOsType.Darwin:
strLibFileExtn = ".dylib"
else:
strLibFileExtn = ".so"
strSrc = os.path.join("lib", "liblldb" + strLibFileExtn)
bOk, strErrMsg = make_symlink(vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget)
return (bOk, strErrMsg)
开发者ID:YuxingTang,项目名称:lldb,代码行数:35,代码来源:finishSwigPythonLLDB.py
示例6: make_symlink_liblldb
def make_symlink_liblldb( vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName ):
dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_liblldb()" );
bOk = True;
strErrMsg = "";
strTarget = vstrLiblldbFileName;
strSrc = "";
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Windows:
# When importing an extension module using a debug version of python, you
# write, for example, "import foo", but the interpreter searches for
# "foo_d.pyd"
if vDictArgs["--buildConfig"].lower() == "debug":
strTarget += "_d";
strTarget += ".pyd";
else:
strTarget += ".so";
bMakeFileCalled = vDictArgs.has_key( "-m" );
if not bMakeFileCalled:
strSrc = os.path.join("lib", "LLDB");
else:
strLibFileExtn = "";
if eOSType == utilsOsType.EnumOsType.Windows:
strSrc = os.path.join("bin", "liblldb.dll");
else:
if eOSType == utilsOsType.EnumOsType.Darwin:
strLibFileExtn = ".dylib";
else:
strLibFileExtn = ".so";
strSrc = os.path.join("lib", "liblldb" + strLibFileExtn);
bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget );
return (bOk, strErrMsg);
开发者ID:CODECOMMUNITY,项目名称:lldb,代码行数:35,代码来源:finishSwigPythonLLDB.py
示例7: make_symlink_lldb_argdumper
def make_symlink_lldb_argdumper(
vDictArgs,
vstrFrameworkPythonDir,
vstrArgdumperFileName):
dbg = utilsDebug.CDebugFnVerbose(
"Python script make_symlink_lldb_argdumper()")
bOk = True
strErrMsg = ""
strTarget = vstrArgdumperFileName
strSrc = ""
eOSType = utilsOsType.determine_os_type()
if eOSType == utilsOsType.EnumOsType.Windows:
strTarget += ".exe"
bMakeFileCalled = "-m" in vDictArgs
if not bMakeFileCalled:
return (bOk, strErrMsg)
else:
strExeFileExtn = ""
if eOSType == utilsOsType.EnumOsType.Windows:
strExeFileExtn = ".exe"
strSrc = os.path.join("bin", "lldb-argdumper" + strExeFileExtn)
bOk, strErrMsg = make_symlink(
vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget)
return (bOk, strErrMsg)
开发者ID:krytarowski,项目名称:lldb,代码行数:28,代码来源:finishSwigPythonLLDB.py
示例8: main
def main( vArgv ):
dbg = utilsDebug.CDebugFnVerbose( "main()" );
bOk = False;
dictArgs = {};
nResult = 0;
strMsg = "";
# The validate arguments fn will exit the program if tests fail
nResult, dictArgs = validate_arguments( vArgv );
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Unknown:
program_exit( -4, strMsgErrorOsTypeUnknown );
global gbDbgFlag;
gbDbgFlag = dictArgs.has_key( "-d" );
if gbDbgFlag:
print_out_input_parameters( dictArgs );
# Check to see if we were called from the Makefile system. If we were, check
# if the caller wants SWIG to generate a dependency file.
# Not used in this program, but passed through to the language script file
# called by this program
global gbMakeFileFlag;
gbMakeFileFlag = dictArgs.has_key( "-m" );
nResult, strMsg = run_post_process_for_each_script_supported( dictArgs );
program_exit( nResult, strMsg );
开发者ID:CODECOMMUNITY,项目名称:lldb,代码行数:29,代码来源:finishSwigWrapperClasses.py
示例9: get_help_information
def get_help_information():
strHelpMsg = strHelpInfo;
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Windows:
strHelpMsg += strHelpInfoExtraWindows;
else:
strHelpMsg += strHelpInfoExtraNonWindows;
return strHelpMsg;
开发者ID:BlueRiverInteractive,项目名称:lldb,代码行数:10,代码来源:buildSwigWrapperClasses.py
示例10: make_symlink
def make_symlink( vDictArgs, vstrFrameworkPythonDir, vstrSrcFile, vstrTargetFile ):
dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink()" );
bOk = True;
strErrMsg = "";
bDbg = vDictArgs.has_key( "-d" );
strTarget = os.path.join(vstrFrameworkPythonDir, vstrTargetFile);
strTarget = os.path.normcase( strTarget );
strSrc = "";
os.chdir( vstrFrameworkPythonDir );
bMakeFileCalled = vDictArgs.has_key( "-m" );
eOSType = utilsOsType.determine_os_type();
if not bMakeFileCalled:
return (bOk, strErrMsg);
else:
# Resolve vstrSrcFile path relatively the build directory
if eOSType == utilsOsType.EnumOsType.Windows:
# On a Windows platform the vstrFrameworkPythonDir looks like:
# llvm\\build\\Lib\\site-packages\\lldb
strBuildDir = os.path.join("..", "..", "..");
else:
# On a UNIX style platform the vstrFrameworkPythonDir looks like:
# llvm/build/lib/python2.7/site-packages/lldb
strBuildDir = os.path.join("..", "..", "..", "..");
strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile));
strTargetDir = os.path.dirname(strTarget);
strSrc = os.path.relpath(os.path.abspath(strSrc), strTargetDir);
if eOSType == utilsOsType.EnumOsType.Unknown:
bOk = False;
strErrMsg = strErrMsgOsTypeUnknown;
elif eOSType == utilsOsType.EnumOsType.Windows:
if os.path.isfile( strTarget ):
if bDbg:
print strMsgSymlinkExists % vstrTargetFile;
return (bOk, strErrMsg);
if bDbg:
print strMsgSymlinkMk % (vstrTargetFile, strSrc, strTarget);
bOk, strErrMsg = make_symlink_windows( strSrc,
strTarget );
else:
if os.path.islink( strTarget ):
if bDbg:
print strMsgSymlinkExists % vstrTargetFile;
return (bOk, strErrMsg);
if bDbg:
print strMsgSymlinkMk % (vstrTargetFile, strSrc, strTarget);
bOk, strErrMsg = make_symlink_other_platforms( strSrc,
strTarget );
return (bOk, strErrMsg);
开发者ID:CTSRD-CHERI,项目名称:lldb,代码行数:51,代码来源:finishSwigPythonLLDB.py
示例11: make_symlink
def make_symlink(vDictArgs, vstrFrameworkPythonDir):
dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink()")
bOk = True
strWkDir = ""
strErrMsg = ""
strSoFileName = "_lldb"
eOSType = utilsOsType.determine_os_type()
if eOSType == utilsOsType.EnumOsType.Unknown:
bOk = False
strErrMsg = strErrMsgOsTypeUnknown
elif eOSType == utilsOsType.EnumOsType.Windows:
bOk, strErrMsg = make_symlink_windows(vDictArgs, vstrFrameworkPythonDir, strSoFileName)
else:
bOk, strErrMsg = make_symlink_other_platforms(vDictArgs, vstrFrameworkPythonDir, strSoFileName)
return (bOk, strErrMsg)
开发者ID:luiseduardohdbackup,项目名称:lldb,代码行数:16,代码来源:finishSwigPythonLLDB.py
示例12: get_framework_python_dir
def get_framework_python_dir( vDictArgs ):
dbg = utilsDebug.CDebugFnVerbose( "Python script get_framework_python_dir()" );
bOk = True;
strWkDir = "";
strErrMsg = "";
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Unknown:
bOk = False;
strErrMsg = strErrMsgOsTypeUnknown;
elif eOSType == utilsOsType.EnumOsType.Windows:
bOk, strWkDir, strErrMsg = get_framework_python_dir_windows( vDictArgs );
else:
bOk, strWkDir, strErrMsg = get_framework_python_dir_other_platforms( vDictArgs );
return (bOk, strWkDir, strErrMsg);
开发者ID:CTSRD-CHERI,项目名称:lldb,代码行数:16,代码来源:buildSwigPython.py
示例13: make_symlink_liblldb
def make_symlink_liblldb( vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName ):
dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_liblldb()" );
bOk = True;
strErrMsg = "";
strTarget = vstrLiblldbFileName;
strSrc = "";
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Windows:
# When importing an extension module using a debug version of python, you
# write, for example, "import foo", but the interpreter searches for
# "foo_d.pyd"
if is_debug_interpreter():
strTarget += "_d";
strTarget += ".pyd";
else:
strTarget += ".so";
bMakeFileCalled = vDictArgs.has_key( "-m" );
if not bMakeFileCalled:
strSrc = os.path.join("lib", "LLDB");
else:
strLibFileExtn = "";
if eOSType == utilsOsType.EnumOsType.Windows:
strSrc = os.path.join("bin", "liblldb.dll");
else:
if eOSType == utilsOsType.EnumOsType.Darwin:
strLibFileExtn = ".dylib";
else:
strLibFileExtn = ".so";
strSrc = os.path.join("lib", "liblldb" + strLibFileExtn);
if eOSType != utilsOsType.EnumOsType.Windows:
# Create a symlink to the "lib" directory, to ensure liblldb's RPATH is
# effective.
bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, "lib", os.path.join("../lib") );
if not bOk:
return (bOk, strErrMsg)
bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget );
return (bOk, strErrMsg);
开发者ID:CTSRD-CHERI,项目名称:lldb,代码行数:42,代码来源:finishSwigPythonLLDB.py
示例14: make_symlink_other_platforms
def make_symlink_other_platforms(vDictArgs, vstrFrameworkPythonDir, vstrSoPath):
dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink_other_platforms()")
bOk = True
strMsg = ""
bDbg = vDictArgs.has_key("-d")
strTarget = vstrSoPath + ".so"
strSoPath = "%s/%s" % (vstrFrameworkPythonDir, strTarget)
strTarget = os.path.normcase(strSoPath)
strSrc = ""
os.chdir(vstrFrameworkPythonDir)
bMakeFileCalled = vDictArgs.has_key("-m")
if not bMakeFileCalled:
strSrc = os.path.normcase("../../../LLDB")
else:
strLibFileExtn = ""
eOSType = utilsOsType.determine_os_type()
if eOSType == utilsOsType.EnumOsType.Linux:
strLibFileExtn = ".so"
elif eOSType == utilsOsType.EnumOsType.Darwin:
strLibFileExtn = ".dylib"
strSrc = os.path.normcase("../../../liblldb%s" % strLibFileExtn)
if os.path.islink(strTarget):
if bDbg:
print strMsglldbsoExists % strTarget
return (bOk, strMsg)
if bDbg:
print strMsglldbsoMk
try:
os.symlink(strSrc, strTarget)
except OSError as e:
bOk = False
strMsg = "OSError( %d ): %s %s" % (e.errno, e.strerror, strErrMsgMakeSymlink)
strMsg += " Src:'%s' Target:'%s'" % (strSrc, strTarget)
except:
bOk = False
strMsg = strErrMsgUnexpected % sys.exec_info()[0]
return (bOk, strMsg)
开发者ID:luiseduardohdbackup,项目名称:lldb,代码行数:42,代码来源:finishSwigPythonLLDB.py
示例15: make_symlink_argdumper
def make_symlink_argdumper( vDictArgs, vstrFrameworkPythonDir, vstrArgdumperFileName ):
dbg = utilsDebug.CDebugFnVerbose( "Python script make_symlink_argdumper()" );
bOk = True;
strErrMsg = "";
strTarget = vstrArgdumperFileName;
strSrc = "";
eOSType = utilsOsType.determine_os_type();
if eOSType == utilsOsType.EnumOsType.Windows:
strTarget += ".exe";
bMakeFileCalled = vDictArgs.has_key( "-m" );
if not bMakeFileCalled:
return (bOk, strErrMsg);
else:
strExeFileExtn = "";
if eOSType == utilsOsType.EnumOsType.Windows:
strExeFileExtn = ".exe";
strSrc = os.path.join("bin", "argdumper" + strExeFileExtn);
bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget );
return (bOk, strErrMsg);
开发者ID:CTSRD-CHERI,项目名称:lldb,代码行数:23,代码来源:finishSwigPythonLLDB.py
示例16: macosx_copy_file_for_heap
def macosx_copy_file_for_heap(vDictArgs, vstrFrameworkPythonDir):
dbg = utilsDebug.CDebugFnVerbose("Python script macosx_copy_file_for_heap()")
bOk = True
strMsg = ""
eOSType = utilsOsType.determine_os_type()
if eOSType != utilsOsType.EnumOsType.Darwin:
return (bOk, strMsg)
strHeapDir = vstrFrameworkPythonDir + "/macosx/heap"
strHeapDir = os.path.normcase(strHeapDir)
if os.path.exists(strHeapDir) and os.path.isdir(strHeapDir):
return (bOk, strMsg)
os.makedirs(strHeapDir)
strRoot = vDictArgs["--srcRoot"]
strSrc = strRoot + "/examples/darwin/heap_find/heap/heap_find.cpp"
shutil.copy(strSrc, strHeapDir)
strSrc = strRoot + "/examples/darwin/heap_find/heap/Makefile"
shutil.copy(strSrc, strHeapDir)
return (bOk, strMsg)
开发者ID:luiseduardohdbackup,项目名称:lldb,代码行数:23,代码来源:finishSwigPythonLLDB.py
示例17: macosx_copy_file_for_heap
def macosx_copy_file_for_heap( vDictArgs, vstrFrameworkPythonDir ):
dbg = utilsDebug.CDebugFnVerbose( "Python script macosx_copy_file_for_heap()" );
bOk = True;
strMsg = "";
eOSType = utilsOsType.determine_os_type();
if eOSType != utilsOsType.EnumOsType.Darwin:
return (bOk, strMsg);
strHeapDir = os.path.join(vstrFrameworkPythonDir, "macosx", "heap");
strHeapDir = os.path.normcase( strHeapDir );
if (os.path.exists( strHeapDir ) and os.path.isdir( strHeapDir )):
return (bOk, strMsg);
os.makedirs( strHeapDir );
strRoot = os.path.normpath(vDictArgs[ "--srcRoot" ]);
strSrc = os.path.join(strRoot, "examples", "darwin", "heap_find", "heap", "heap_find.cpp");
shutil.copy( strSrc, strHeapDir );
strSrc = os.path.join(strRoot, "examples", "darwin", "heap_find", "heap", "Makefile");
shutil.copy( strSrc, strHeapDir );
return (bOk, strMsg);
开发者ID:CTSRD-CHERI,项目名称:lldb,代码行数:23,代码来源:finishSwigPythonLLDB.py
示例18: main
def main( vDictArgs ):
dbg = utilsDebug.CDebugFnVerbose( "Python script main()" );
bOk = True;
strMsg = "";
strErrMsgProgFail = "";
bDbg = vDictArgs.has_key( "-d" );
eOSType = utilsOsType.determine_os_type();
if bDbg:
pyVersion = sys.version_info;
print(strMsgOsVersion % utilsOsType.EnumOsType.name_of( eOSType ));
print(strMsgPyVersion % (pyVersion[ 0 ], pyVersion[ 1 ]));
bOk, strFrameworkPythonDir, strMsg = get_framework_python_dir( vDictArgs );
if bOk:
bOk, strCfgBldDir, strMsg = get_config_build_dir( vDictArgs, strFrameworkPythonDir );
if bOk and bDbg:
print strMsgPyFileLocatedHere % strFrameworkPythonDir;
print strMsgConfigBuildDir % strCfgBldDir;
if bOk:
bOk, strMsg = find_or_create_python_dir( vDictArgs, strFrameworkPythonDir );
if bOk:
bOk, strMsg = create_symlinks( vDictArgs, strFrameworkPythonDir );
if bOk:
bOk, strMsg = copy_lldbpy_file_to_lldb_pkg_dir( vDictArgs,
strFrameworkPythonDir,
strCfgBldDir );
strRoot = vDictArgs[ "--srcRoot" ];
if bOk:
# lldb
listPkgFiles = [ strRoot + "/source/Interpreter/embedded_interpreter.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "", listPkgFiles );
if bOk:
# lldb/formatters/cpp
listPkgFiles = [ strRoot + "/examples/synthetic/gnu_libstdcpp.py",
strRoot + "/examples/synthetic/libcxx.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/formatters/cpp", listPkgFiles );
if bOk:
# Make an empty __init__.py in lldb/runtime as this is required for
# Python to recognize lldb.runtime as a valid package (and hence,
# lldb.runtime.objc as a valid contained package)
listPkgFiles = [];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/runtime", listPkgFiles );
if bOk:
# lldb/formatters
# Having these files copied here ensure that lldb/formatters is a
# valid package itself
listPkgFiles = [ strRoot + "/examples/summaries/cocoa/cache.py",
strRoot + "/examples/summaries/cocoa/metrics.py",
strRoot + "/examples/summaries/cocoa/attrib_fromdict.py",
strRoot + "/examples/summaries/cocoa/Logger.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/formatters", listPkgFiles );
if bOk:
# lldb/utils
listPkgFiles = [ strRoot + "/examples/python/symbolication.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/utils", listPkgFiles );
if bOk and (eOSType == utilsOsType.EnumOsType.Darwin):
# lldb/macosx
listPkgFiles = [ strRoot + "/examples/python/crashlog.py",
strRoot + "/examples/darwin/heap_find/heap.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/macosx", listPkgFiles );
if bOk and (eOSType == utilsOsType.EnumOsType.Darwin):
# lldb/diagnose
listPkgFiles = [ strRoot + "/examples/python/diagnose_unwind.py",
strRoot + "/examples/python/diagnose_nsstring.py" ];
bOk, strMsg = create_py_pkg( vDictArgs, strFrameworkPythonDir, "/diagnose", listPkgFiles );
if bOk:
bOk, strMsg = macosx_copy_file_for_heap( vDictArgs, strFrameworkPythonDir );
if bOk:
return (0, strMsg );
else:
strErrMsgProgFail += strMsg;
return (-100, strErrMsgProgFail );
开发者ID:johndpope,项目名称:lldb,代码行数:86,代码来源:finishSwigPythonLLDB.py
示例19: main
def main(vDictArgs):
dbg = utilsDebug.CDebugFnVerbose("Python script main()")
bOk = True
strMsg = ""
strErrMsgProgFail = ""
bDbg = "-d" in vDictArgs
eOSType = utilsOsType.determine_os_type()
if bDbg:
pyVersion = sys.version_info
print((strMsgOsVersion % utilsOsType.EnumOsType.name_of(eOSType)))
print((strMsgPyVersion % (pyVersion[0], pyVersion[1])))
bOk, strFrameworkPythonDir, strMsg = get_framework_python_dir(vDictArgs)
if bOk:
bOk, strCfgBldDir, strMsg = get_config_build_dir(
vDictArgs, strFrameworkPythonDir)
if bOk and bDbg:
print((strMsgPyFileLocatedHere % strFrameworkPythonDir))
print((strMsgConfigBuildDir % strCfgBldDir))
if bOk:
bOk, strLldbLibDir, strMsg = get_liblldb_dir(vDictArgs)
if bOk:
bOk, strMsg = find_or_create_python_dir(
vDictArgs, strFrameworkPythonDir)
if bOk:
bOk, strMsg = create_symlinks(
vDictArgs, strFrameworkPythonDir, strLldbLibDir)
if bOk:
bOk, strMsg = copy_six(vDictArgs, strFrameworkPythonDir)
if bOk:
bOk, strMsg = copy_lldbpy_file_to_lldb_pkg_dir(vDictArgs,
strFrameworkPythonDir,
strCfgBldDir)
strRoot = os.path.normpath(vDictArgs["--srcRoot"])
if bOk:
# lldb
listPkgFiles = [
os.path.join(
strRoot,
"source",
"Interpreter",
"embedded_interpreter.py")]
bOk, strMsg = create_py_pkg(
vDictArgs, strFrameworkPythonDir, "", listPkgFiles)
if bOk:
# lldb/formatters/cpp
listPkgFiles = [
os.path.join(
strRoot,
"examples",
"synthetic",
"gnu_libstdcpp.py"),
os.path.join(
strRoot,
"examples",
"synthetic",
"libcxx.py")]
bOk, strMsg = create_py_pkg(
vDictArgs, strFrameworkPythonDir, "/formatters/cpp", listPkgFiles)
if bOk:
# Make an empty __init__.py in lldb/runtime as this is required for
# Python to recognize lldb.runtime as a valid package (and hence,
# lldb.runtime.objc as a valid contained package)
listPkgFiles = []
bOk, strMsg = create_py_pkg(
vDictArgs, strFrameworkPythonDir, "/runtime", listPkgFiles)
if bOk:
# lldb/formatters
# Having these files copied here ensure that lldb/formatters is a
# valid package itself
listPkgFiles = [
os.path.join(
strRoot, "examples", "summaries", "cocoa", "cache.py"), os.path.join(
strRoot, "examples", "summaries", "synth.py"), os.path.join(
strRoot, "examples", "summaries", "cocoa", "metrics.py"), os.path.join(
strRoot, "examples", "summaries", "cocoa", "attrib_fromdict.py"), os.path.join(
strRoot, "examples", "summaries", "cocoa", "Logger.py")]
bOk, strMsg = create_py_pkg(
vDictArgs, strFrameworkPythonDir, "/formatters", listPkgFiles)
if bOk:
# lldb/utils
listPkgFiles = [
os.path.join(
strRoot,
"examples",
"python",
"symbolication.py")]
bOk, strMsg = create_py_pkg(
#.........这里部分代码省略.........
开发者ID:krytarowski,项目名称:lldb,代码行数:101,代码来源:finishSwigPythonLLDB.py
注:本文中的utilsOsType.determine_os_type函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论