fetch_configs: switch to 4 space indent

Reformat this dir by itself to help merging with conflicts with other CLs.

Reformatted using:
parallel ./yapf -i -- fetch_configs/*
~/chromiumos/chromite/contrib/reflow_overlong_comments fetch_configs/*

The 2 files that still had strings that were too long were manually
reformatted.
fetch_configs/config_util.py
fetch_configs/devtools-internal.py

Change-Id: Ic8aaf41fa462342743a39166da98c4e915fadd44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4844310
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/10/4844310/2
Mike Frysinger 2 years ago committed by LUCI CQ
parent e4829e85fa
commit 691128f836

@ -0,0 +1,3 @@
[style]
based_on_style = pep8
column_limit = 80

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Android(config_util.Config):
"""Basic Config alias for Android -> Chromium."""
"""Basic Config alias for Android -> Chromium."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=android'],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=android'],
},
}
@staticmethod
def expected_root(_props):
return ''
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return Android().handle_args(argv)
return Android().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class AndroidInternal(config_util.Config):
"""Basic Config alias for AndroidInternal -> Chromium."""
"""Basic Config alias for AndroidInternal -> Chromium."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=android', '--internal=True'],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=android', '--internal=True'],
},
}
@staticmethod
def expected_root(_props):
return ''
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return AndroidInternal().handle_args(argv)
return AndroidInternal().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -11,38 +11,35 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class ANGLE(config_util.Config):
"""Basic Config class for ANGLE."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/angle/angle.git'
solution = {
'name': '.',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_vars': {},
}
spec = {
'solutions': [solution]
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if ast.literal_eval(props.get('internal', 'False')):
solution['custom_vars']['checkout_angle_internal'] = True
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return ''
"""Basic Config class for ANGLE."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/angle/angle.git'
solution = {
'name': '.',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_vars': {},
}
spec = {'solutions': [solution]}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if ast.literal_eval(props.get('internal', 'False')):
solution['custom_vars']['checkout_angle_internal'] = True
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return ANGLE().handle_args(argv)
return ANGLE().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,35 +10,35 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Breakpad(config_util.Config):
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/breakpad/breakpad.git'
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/breakpad/breakpad.git'
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return Breakpad().handle_args(argv)
return Breakpad().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,27 +10,26 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Chrome(config_util.Config):
"""Basic Config alias for Chrome -> Chromium."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': [
'--internal=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
"""Basic Config alias for Chrome -> Chromium."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': [
'--internal=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return Chrome().handle_args(argv)
return Chrome().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -11,42 +11,42 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Chromium(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/src.git'
solution = { 'name' :'src',
'url' : url,
'managed' : False,
'custom_deps': {},
'custom_vars': {},
}
if props.get('webkit_revision', '') == 'ToT':
solution['custom_vars']['webkit_revision'] = ''
if ast.literal_eval(props.get('internal', 'False')):
solution['custom_vars']['checkout_src_internal'] = True
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/src.git'
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
'custom_vars': {},
}
if props.get('webkit_revision', '') == 'ToT':
solution['custom_vars']['webkit_revision'] = ''
if ast.literal_eval(props.get('internal', 'False')):
solution['custom_vars']['checkout_src_internal'] = True
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return Chromium().handle_args(argv)
return Chromium().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -1,7 +1,6 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module holds utilities which make writing configs easier."""
from __future__ import print_function
@ -10,43 +9,43 @@ import json
class Config(object):
"""Base class for all configs.
Provides methods that are expected to be overridden by child classes. Also
provides an command-line parsing method that converts the unified command-line
interface used in depot_tools to the unified python interface defined here."""
@staticmethod
def fetch_spec(_props):
"""Returns instructions to check out the project, conditioned on |props|."""
raise NotImplementedError
@staticmethod
def expected_root(_props):
"""Returns the directory into which the checkout will be performed."""
raise NotImplementedError
def handle_args(self, argv):
"""Passes the command-line arguments through to the appropriate method."""
methods = {'fetch': self.fetch_spec,
'root': self.expected_root}
if len(argv) <= 1 or argv[1] not in methods:
print('Must specify a a fetch/root action')
return 1
def looks_like_arg(arg):
return arg.startswith('--') and arg.count('=') == 1
bad_parms = [x for x in argv[2:] if not looks_like_arg(x)]
if bad_parms:
print('Got bad arguments %s' % bad_parms)
return 1
method = methods[argv[1]]
props = dict(x.split('=', 1) for x in (y.lstrip('-') for y in argv[2:]))
self.output(method(props))
@staticmethod
def output(data):
print(json.dumps(data))
"""Base class for all configs.
Provides methods that are expected to be overridden by child classes. Also
provides an command-line parsing method that converts the unified
command-line interface used in depot_tools to the unified python interface
defined here.
"""
@staticmethod
def fetch_spec(_props):
"""Returns instructions to check out the project based on |props|."""
raise NotImplementedError
@staticmethod
def expected_root(_props):
"""Returns the directory into which the checkout will be performed."""
raise NotImplementedError
def handle_args(self, argv):
"""Passes command-line arguments through to the appropriate method."""
methods = {'fetch': self.fetch_spec, 'root': self.expected_root}
if len(argv) <= 1 or argv[1] not in methods:
print('Must specify a a fetch/root action')
return 1
def looks_like_arg(arg):
return arg.startswith('--') and arg.count('=') == 1
bad_parms = [x for x in argv[2:] if not looks_like_arg(x)]
if bad_parms:
print('Got bad arguments %s' % bad_parms)
return 1
method = methods[argv[1]]
props = dict(x.split('=', 1) for x in (y.lstrip('-') for y in argv[2:]))
self.output(method(props))
@staticmethod
def output(data):
print(json.dumps(data))

@ -10,32 +10,32 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class CrashpadConfig(config_util.Config):
"""Basic Config class for Crashpad."""
@staticmethod
def fetch_spec(props):
spec = {
'solutions': [
{
'name': 'crashpad',
'url': 'https://chromium.googlesource.com/crashpad/crashpad.git',
'managed': False,
},
],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'crashpad'
"""Basic Config class for Crashpad."""
@staticmethod
def fetch_spec(props):
spec = {
'solutions': [
{
'name': 'crashpad',
'url':
'https://chromium.googlesource.com/crashpad/crashpad.git',
'managed': False,
},
],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'crashpad'
def main(argv=None):
return CrashpadConfig().handle_args(argv)
return CrashpadConfig().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,36 +10,35 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Dart(config_util.Config):
"""Basic Config class for Dart."""
@staticmethod
def fetch_spec(props):
url = 'https://dart.googlesource.com/sdk.git'
solution = {
'name' :'sdk',
'url' : url,
'deps_file': 'DEPS',
'managed' : False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'sdk'
"""Basic Config class for Dart."""
@staticmethod
def fetch_spec(props):
url = 'https://dart.googlesource.com/sdk.git'
solution = {
'name': 'sdk',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'sdk'
def main(argv=None):
return Dart().handle_args(argv)
return Dart().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,35 +10,34 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class DepotTools(config_util.Config):
"""Basic Config class for DepotTools."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
solution = {
'name' : 'depot_tools',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution],
}
checkout_type = 'gclient_git'
spec_type = '%s_spec' % checkout_type
return {
'type': checkout_type,
spec_type: spec,
}
@staticmethod
def expected_root(_props):
return 'depot_tools'
"""Basic Config class for DepotTools."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
solution = {
'name': 'depot_tools',
'url': url,
'deps_file': 'DEPS',
'managed': False,
}
spec = {
'solutions': [solution],
}
checkout_type = 'gclient_git'
spec_type = '%s_spec' % checkout_type
return {
'type': checkout_type,
spec_type: spec,
}
@staticmethod
def expected_root(_props):
return 'depot_tools'
def main(argv=None):
return DepotTools().handle_args(argv)
return DepotTools().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,35 +10,34 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class DevToolsFrontend(config_util.Config):
"""Basic Config class for DevTools frontend."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/devtools/devtools-frontend.git'
solution = {
'name' : 'devtools-frontend',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'devtools-frontend'
"""Basic Config class for DevTools frontend."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/devtools/devtools-frontend.git'
solution = {
'name': 'devtools-frontend',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'devtools-frontend'
def main(argv=None):
return DevToolsFrontend().handle_args(argv)
return DevToolsFrontend().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,35 +10,35 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class DevToolsInternal(config_util.Config):
"""Basic Config class for the whole set of DevTools."""
@staticmethod
def fetch_spec(props):
url = 'https://chrome-internal.googlesource.com/devtools/devtools-internal.git'
solution = {
'name' : 'devtools-internal',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'devtools-internal'
"""Basic Config class for the whole set of DevTools."""
@staticmethod
def fetch_spec(props):
url = ('https://chrome-internal.googlesource.com/devtools/'
'devtools-internal.git')
solution = {
'name': 'devtools-internal',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'devtools-internal'
def main(argv=None):
return DevToolsInternal().handle_args(argv)
return DevToolsInternal().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,34 +10,31 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Flutter(config_util.Config):
"""Basic Config class for the Flutter repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'custom_deps': {},
'deps_file': 'DEPS',
'managed' : False,
'name' : 'src/flutter',
'safesync_url': '',
'url' : 'https://github.com/flutter/engine.git',
}
spec = {
'solutions': [solution]
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
"""Basic Config class for the Flutter repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'custom_deps': {},
'deps_file': 'DEPS',
'managed': False,
'name': 'src/flutter',
'safesync_url': '',
'url': 'https://github.com/flutter/engine.git',
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return Flutter().handle_args(argv)
return Flutter().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,33 +10,32 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Gn(config_util.Config):
"""Basic Config class for Gn."""
@staticmethod
def fetch_spec(props):
url = 'https://gn.googlesource.com/gn.git'
solution = {
'name' :'gn',
'url' : url,
'deps_file': 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'gn'
"""Basic Config class for Gn."""
@staticmethod
def fetch_spec(props):
url = 'https://gn.googlesource.com/gn.git'
solution = {
'name': 'gn',
'url': url,
'deps_file': 'DEPS',
'managed': False,
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'gn'
def main(argv=None):
return Gn().handle_args(argv)
return Gn().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,30 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class GomaClient(config_util.Config):
"""Basic Config class for Goma client."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [
{
'name' : 'client',
'url' : 'https://chromium.googlesource.com/infra/goma/client.git',
'deps_file': 'DEPS',
'managed' : False,
}
],
},
}
@staticmethod
def expected_root(_props):
return 'client'
"""Basic Config class for Goma client."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [{
'name': 'client',
'url':
'https://chromium.googlesource.com/infra/goma/client.git',
'deps_file': 'DEPS',
'managed': False,
}],
},
}
@staticmethod
def expected_root(_props):
return 'client'
def main(argv=None):
return GomaClient().handle_args(argv)
return GomaClient().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,32 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Chromium(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/gyp.git'
solution = { 'name' :'gyp',
'url' : url,
'managed' : False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'gyp'
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/gyp.git'
solution = {
'name': 'gyp',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'gyp'
def main(argv=None):
return Chromium().handle_args(argv)
return Chromium().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Infra(config_util.Config):
"""Basic Config class for the Infrastructure repositories."""
"""Basic Config class for the Infrastructure repositories."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'infra_superproject',
'props': [],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'infra_superproject',
'props': [],
},
}
@staticmethod
def expected_root(_props):
return ''
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return Infra().handle_args(argv)
return Infra().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,27 +10,26 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class InfraInternal(config_util.Config):
"""Basic Config class for the whole set of Infrastructure repositories."""
@staticmethod
def fetch_spec(_props):
return {
'alias': {
'config': 'infra_superproject',
'props': [
'--checkout_internal=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
"""Basic Config class for the whole set of Infrastructure repositories."""
@staticmethod
def fetch_spec(_props):
return {
'alias': {
'config': 'infra_superproject',
'props': [
'--checkout_internal=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return InfraInternal().handle_args(argv)
return InfraInternal().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -11,37 +11,37 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class InfraSuperproject(config_util.Config):
"""Basic Config class for the whole set of Infrastructure repositories."""
@staticmethod
def fetch_spec(props):
def url(host, repo):
return 'https://%s.googlesource.com/%s.git' % (host, repo)
spec = {
'solutions': [
{
'name': '.',
'url': url('chromium', 'infra/infra_superproject'),
'managed': True,
'custom_vars': {},
},
],
}
if ast.literal_eval(props.get('checkout_internal', 'False')):
spec['solutions'][0]['custom_vars']['checkout_internal'] = True
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return '.'
"""Basic Config class for the whole set of Infrastructure repositories."""
@staticmethod
def fetch_spec(props):
def url(host, repo):
return 'https://%s.googlesource.com/%s.git' % (host, repo)
spec = {
'solutions': [
{
'name': '.',
'url': url('chromium', 'infra/infra_superproject'),
'managed': True,
'custom_vars': {},
},
],
}
if ast.literal_eval(props.get('checkout_internal', 'False')):
spec['solutions'][0]['custom_vars']['checkout_internal'] = True
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return '.'
def main(argv=None):
return InfraSuperproject().handle_args(argv)
return InfraSuperproject().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,31 +10,31 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class InspectorProtocol(config_util.Config):
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/deps/inspector_protocol.git'
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/deps/inspector_protocol.git'
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return InspectorProtocol().handle_args(argv)
return InspectorProtocol().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class IOS(config_util.Config):
"""Basic Config alias for iOS -> Chromium."""
"""Basic Config alias for iOS -> Chromium."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=ios', '--target_os_only=True'],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': ['--target_os=ios', '--target_os_only=True'],
},
}
@staticmethod
def expected_root(_props):
return ''
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return IOS().handle_args(argv)
return IOS().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,29 +10,29 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class IOSInternal(config_util.Config):
"""Basic Config class for Chrome on iOS."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'props': [
'--internal=True',
'--target_os=ios',
'--target_os_only=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
"""Basic Config class for Chrome on iOS."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config':
'chromium',
'props': [
'--internal=True',
'--target_os=ios',
'--target_os_only=True',
],
},
}
@staticmethod
def expected_root(_props):
return ''
def main(argv=None):
return IOSInternal().handle_args(argv)
return IOSInternal().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,39 +10,38 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class NaCl(config_util.Config):
"""Basic Config class for NaCl."""
@staticmethod
def fetch_spec(props):
url = ('https://chromium.googlesource.com/native_client/'
'src/native_client.git')
solution = {
'name' : 'native_client',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'native_client'
"""Basic Config class for NaCl."""
@staticmethod
def fetch_spec(props):
url = ('https://chromium.googlesource.com/native_client/'
'src/native_client.git')
solution = {
'name': 'native_client',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'native_client'
def main(argv=None):
return NaCl().handle_args(argv)
return NaCl().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,38 +10,37 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Naclports(config_util.Config):
"""Basic Config class for naclports."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/naclports.git'
solution = {
'name' : 'src',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
"""Basic Config class for naclports."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/naclports.git'
solution = {
'name': 'src',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return Naclports().handle_args(argv)
return Naclports().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,31 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class NodeCI(config_util.Config):
"""Basic Config class for node-ci."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/node-ci.git'
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [{
'name' : 'node-ci',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}],
},
}
@staticmethod
def expected_root(_props):
return 'node-ci'
"""Basic Config class for node-ci."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/node-ci.git'
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [{
'name': 'node-ci',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}],
},
}
@staticmethod
def expected_root(_props):
return 'node-ci'
def main(argv=None):
return NodeCI().handle_args(argv)
return NodeCI().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,41 +10,40 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class PdfiumConfig(config_util.Config):
"""Basic Config class for pdfium."""
@staticmethod
def fetch_spec(props):
url = 'https://pdfium.googlesource.com/pdfium.git'
solution = {
'name': 'pdfium',
'url': url,
'managed': False,
'custom_vars': {},
}
if props.get('checkout_configuration'):
solution['custom_vars']['checkout_configuration'] = props[
'checkout_configuration']
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'pdfium'
"""Basic Config class for pdfium."""
@staticmethod
def fetch_spec(props):
url = 'https://pdfium.googlesource.com/pdfium.git'
solution = {
'name': 'pdfium',
'url': url,
'managed': False,
'custom_vars': {},
}
if props.get('checkout_configuration'):
solution['custom_vars']['checkout_configuration'] = props[
'checkout_configuration']
spec = {
'solutions': [solution],
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('target_os_only'):
spec['target_os_only'] = props['target_os_only']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'pdfium'
def main(argv=None):
return PdfiumConfig().handle_args(argv)
return PdfiumConfig().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,29 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Skia(config_util.Config):
"""Basic Config class for the Skia repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name' : 'skia',
'url' : 'https://skia.googlesource.com/skia.git',
'deps_file': 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution]
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'skia'
"""Basic Config class for the Skia repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name': 'skia',
'url': 'https://skia.googlesource.com/skia.git',
'deps_file': 'DEPS',
'managed': False,
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'skia'
def main(argv=None):
return Skia().handle_args(argv)
return Skia().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,29 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class SkiaBuildbot(config_util.Config):
"""Basic Config class for the Skia Buildbot repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name' : 'buildbot',
'url' : 'https://skia.googlesource.com/buildbot.git',
'deps_file': 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution]
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'buildbot'
"""Basic Config class for the Skia Buildbot repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name': 'buildbot',
'url': 'https://skia.googlesource.com/buildbot.git',
'deps_file': 'DEPS',
'managed': False,
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'buildbot'
def main(argv=None):
return SkiaBuildbot().handle_args(argv)
return SkiaBuildbot().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,29 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Syzygy(config_util.Config):
"""Basic Config class for Syzygy."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [
{
'name' : 'src',
'url' : 'https://chromium.googlesource.com/syzygy',
'deps_file': 'DEPS',
'managed' : False,
}
],
},
}
@staticmethod
def expected_root(_props):
return 'src'
"""Basic Config class for Syzygy."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [{
'name': 'src',
'url': 'https://chromium.googlesource.com/syzygy',
'deps_file': 'DEPS',
'managed': False,
}],
},
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return Syzygy().handle_args(argv)
return Syzygy().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,35 +10,34 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class V8(config_util.Config):
"""Basic Config class for V8."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/v8.git'
solution = {
'name' : 'v8',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'v8'
"""Basic Config class for V8."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/v8.git'
solution = {
'name': 'v8',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
'with_branch_heads': True,
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'v8'
def main(argv=None):
return V8().handle_args(argv)
return V8().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,43 +10,43 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class WebRTC(config_util.Config):
"""Basic Config class for WebRTC."""
@staticmethod
def fetch_spec(props):
url = 'https://webrtc.googlesource.com/src.git'
spec = {
'solutions': [
{
'name': 'src',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
},
],
'with_branch_heads': True,
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('cache_dir'):
spec['cache_dir'] = props['cache_dir']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
"""Basic Config class for WebRTC."""
@staticmethod
def fetch_spec(props):
url = 'https://webrtc.googlesource.com/src.git'
spec = {
'solutions': [
{
'name': 'src',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
},
],
'with_branch_heads':
True,
}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if props.get('cache_dir'):
spec['cache_dir'] = props['cache_dir']
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return WebRTC().handle_args(argv)
return WebRTC().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class WebRTCAndroid(config_util.Config):
"""Basic Config alias for Android -> WebRTC."""
"""Basic Config alias for Android -> WebRTC."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'webrtc',
'props': ['--target_os=android,unix'],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'webrtc',
'props': ['--target_os=android,unix'],
},
}
@staticmethod
def expected_root(_props):
return 'src'
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return WebRTCAndroid().handle_args(argv)
return WebRTCAndroid().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,25 +10,24 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class WebRTCIOS(config_util.Config):
"""Basic Config alias for iOS -> WebRTC."""
"""Basic Config alias for iOS -> WebRTC."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'webrtc',
'props': ['--target_os=ios,mac'],
},
}
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'webrtc',
'props': ['--target_os=ios,mac'],
},
}
@staticmethod
def expected_root(_props):
return 'src'
@staticmethod
def expected_root(_props):
return 'src'
def main(argv=None):
return WebRTCIOS().handle_args(argv)
return WebRTCIOS().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

@ -10,32 +10,32 @@ import config_util # pylint: disable=import-error
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=no-init
class Website(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/website.git'
solution = { 'name' :'website',
'url' : url,
'managed' : False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'website'
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/website.git'
solution = {
'name': 'website',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],
}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,
}
@staticmethod
def expected_root(_props):
return 'website'
def main(argv=None):
return Website().handle_args(argv)
return Website().handle_args(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(main(sys.argv))

Loading…
Cancel
Save