v8.py 998 Bytes
Newer Older
jochen@chromium.org's avatar
jochen@chromium.org committed
1 2 3 4 5 6
# Copyright 2014 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.

import sys

7
import config_util  # pylint: disable=import-error
jochen@chromium.org's avatar
jochen@chromium.org committed
8 9 10


# This class doesn't need an __init__ method, so we disable the warning
11
# pylint: disable=no-init
12 13
class V8(config_util.Config):
  """Basic Config class for V8."""
jochen@chromium.org's avatar
jochen@chromium.org committed
14 15 16

  @staticmethod
  def fetch_spec(props):
17 18 19 20
    url = 'https://chromium.googlesource.com/v8/v8.git'
    solution = {
        'name'        : 'v8',
        'url'         : url,
21
        'deps_file'   : 'DEPS',
22 23
        'managed'     : False,
        'custom_deps' : {},
jochen@chromium.org's avatar
jochen@chromium.org committed
24 25 26
    }
    spec = {
      'solutions': [solution],
27
      'with_branch_heads': True,
jochen@chromium.org's avatar
jochen@chromium.org committed
28 29
    }
    return {
30 31
      'type': 'gclient_git',
      'gclient_git_spec': spec,
jochen@chromium.org's avatar
jochen@chromium.org committed
32 33 34 35 36 37 38 39 40 41 42 43 44
    }

  @staticmethod
  def expected_root(_props):
    return 'v8'


def main(argv=None):
  return V8().handle_args(argv)


if __name__ == '__main__':
  sys.exit(main(sys.argv))