本文整理汇总了Python中build_options.OPTIONS.get_system_packages方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.get_system_packages方法的具体用法?Python OPTIONS.get_system_packages怎么用?Python OPTIONS.get_system_packages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.get_system_packages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _convert_launch_chrome_options_to_external_metadata
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import get_system_packages [as 别名]
def _convert_launch_chrome_options_to_external_metadata(parsed_args):
metadata = parsed_args.additional_metadata
arg_to_metadata = (('can_rotate', 'canRotate'),
('disable_auto_back_button', 'disableAutoBackButton'),
('enable_adb', 'enableAdb'),
('enable_arc_strace', 'enableArcStrace'),
('enable_compositor', 'enableCompositor'),
('enable_external_directory', 'enableExternalDirectory'),
('form_factor', 'formFactor'),
('jdb_port', 'jdbPort'),
('log_load_progress', 'logLoadProgress'),
('minimum_launch_delay', 'minimumLaunchDelay'),
('ndk_abi', 'ndkAbi'),
('orientation', 'orientation'),
('resize', 'resize'),
('stderr_log', 'stderrLog'),
('sleep_on_blur', 'sleepOnBlur'))
for arg_name, metadata_name in arg_to_metadata:
value = getattr(parsed_args, arg_name, None)
if value is not None:
metadata[metadata_name] = value
is_slow_debug_run = bool(parsed_args.jdb_port or parsed_args.gdb)
if is_slow_debug_run:
metadata['isSlowDebugRun'] = is_slow_debug_run
metadata['sleepOnBlur'] = False
if (parsed_args.mode == 'atftest' or parsed_args.mode == 'system' or
OPTIONS.get_system_packages()):
# An app may briefly go through empty stack while running
# addAccounts() in account manager service.
# TODO(igorc): Find a more precise detection mechanism to support GSF,
# implement empty stack timeout, or add a flag if this case is more common.
metadata['allowEmptyActivityStack'] = True
command = _generate_shell_command(parsed_args)
if command:
metadata['shell'] = command
return metadata