当前位置: 首页>>代码示例>>Python>>正文


Python OPTIONS.parse方法代码示例

本文整理汇总了Python中src.build.build_options.OPTIONS.parse方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.parse方法的具体用法?Python OPTIONS.parse怎么用?Python OPTIONS.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在src.build.build_options.OPTIONS的用法示例。


在下文中一共展示了OPTIONS.parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _stub_parse_configure_file

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import parse [as 别名]
def _stub_parse_configure_file():
  """A helper function for trapping calls to read the build options file.

  Populate them with the default build configuration instead, so this test
  behaves the same regardless of the actual configuration.
  """
  OPTIONS.parse([])
开发者ID:epowers,项目名称:arc,代码行数:9,代码来源:run_integration_tests_test.py

示例2: _configure_build_options

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import parse [as 别名]
def _configure_build_options():
  if OPTIONS.parse(sys.argv[1:]):
    print 'Args error'
    return False

  # Write out the configure file early so all other scripts can use
  # the options passed into configure. (e.g., sync_chrome).
  OPTIONS.write_configure_file()

  # Target directory is replaced. If an old directory, out/target/<target>,
  # exists, move it to the new place, out/target/<target>_<opt>.
  old_path = os.path.join('out/target', OPTIONS.target())
  new_path = build_common.get_build_dir()
  if os.path.lexists(old_path):
    if os.path.isdir(old_path) and not os.path.islink(old_path):
      if os.path.exists(new_path):
        file_util.rmtree(old_path)
      else:
        shutil.move(old_path, new_path)
    else:
      os.remove(old_path)

  # Create an empty directory as a placeholder if necessary.
  file_util.makedirs_safely(new_path)

  # Create a symlink from new place to old place to keep as compatible as
  # possible.
  os.symlink(os.path.basename(new_path), old_path)

  # Write out the configure file to a target specific location, which can be
  # queried later to find out what the config for a target was.
  OPTIONS.write_configure_file(build_common.get_target_configure_options_file())

  OPTIONS.set_up_goma()
  return True
开发者ID:epowers,项目名称:arc,代码行数:37,代码来源:configure.py

示例3: setUp

# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import parse [as 别名]
 def setUp(self):
   OPTIONS.parse([])
开发者ID:epowers,项目名称:arc,代码行数:4,代码来源:prep_launch_chrome_test.py


注:本文中的src.build.build_options.OPTIONS.parse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。