Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1304)

Side by Side Diff: tools/dom/scripts/idlsync.py

Issue 537703002: Update idlsync to pull in bindings python scripts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import optparse 6 import optparse
7 import os 7 import os
8 import os.path 8 import os.path
9 import re 9 import re
10 import shutil 10 import shutil
11 import subprocess 11 import subprocess
12 import sys 12 import sys
13 import tempfile 13 import tempfile
14 14
15 SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__)) 15 SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__))
16 DART_PATH = os.path.abspath(os.path.join(SCRIPT_PATH, '..', '..', '..')) 16 DART_PATH = os.path.abspath(os.path.join(SCRIPT_PATH, '..', '..', '..'))
17 17
18 # Dartium DEPS file with Chrome and WebKit revisions. 18 # Dartium DEPS file with Chrome and WebKit revisions.
19 DEPS = ('http://dart.googlecode.com/svn/branches/' 19 DEPS = ('http://dart.googlecode.com/svn/branches/'
20 'bleeding_edge/deps/dartium.deps/DEPS') 20 'bleeding_edge/deps/dartium.deps/DEPS')
21 21
22 # Whitelist of files to keep. 22 # Whitelist of files to keep.
23 WHITELIST = [ 23 WHITELIST = [
24 r'LICENSE(\S+)', 24 r'LICENSE(\S+)',
25 r'(\S+)\.idl', 25 r'(\S+)\.idl',
26 r'(\S+)\.json', 26 r'(\S+)\.json',
27 r'(\S+)\.py', 27 r'(\S+)\.py',
28 r'(\S+)\.txt',
28 ] 29 ]
29 30
30 # WebKit / WebCore info. 31 # WebKit / WebCore info.
31 CHROME_TRUNK = "http://src.chromium.org" 32 CHROME_TRUNK = "http://src.chromium.org"
32 WEBKIT_URL_PATTERN = r'"dartium_webkit_branch": "(\S+)",' 33 WEBKIT_URL_PATTERN = r'"dartium_webkit_branch": "(\S+)",'
33 WEBKIT_REV_PATTERN = r'"dartium_webkit_revision": "(\d+)",' 34 WEBKIT_REV_PATTERN = r'"dartium_webkit_revision": "(\d+)",'
34 WEBCORE_SUBPATH = 'Source/core' 35 WEBCORE_SUBPATH = 'Source/core'
35 MODULES_SUBPATH = 'Source/modules' 36 MODULES_SUBPATH = 'Source/modules'
37 BINDINGS_SUBPATH = 'Source/bindings'
38
36 LOCAL_WEBKIT_IDL_PATH = os.path.join(DART_PATH, 'third_party', 'WebCore') 39 LOCAL_WEBKIT_IDL_PATH = os.path.join(DART_PATH, 'third_party', 'WebCore')
37 LOCAL_WEBKIT_README = """\ 40 LOCAL_WEBKIT_README = """\
38 This directory contains a copy of WebKit/WebCore IDL files. 41 This directory contains a copy of WebKit/WebCore IDL files.
39 See the attached LICENSE-* files in this directory. 42 See the attached LICENSE-* files in this directory.
40 43
41 Please do not modify the files here. They are periodically copied 44 Please do not modify the files here. They are periodically copied
42 using the script: $DART_ROOT/sdk/lib/html/scripts/%(script)s 45 using the script: $DART_ROOT/sdk/lib/html/scripts/%(script)s
43 46
44 The current version corresponds to: 47 The current version corresponds to:
45 URL: %(url)s 48 URL: %(url)s
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DEPS_PATTERNS = { 85 DEPS_PATTERNS = {
83 'webkit': (CHROME_TRUNK, WEBKIT_URL_PATTERN, WEBKIT_REV_PATTERN), 86 'webkit': (CHROME_TRUNK, WEBKIT_URL_PATTERN, WEBKIT_REV_PATTERN),
84 'chrome': (CHROME_TRUNK, CHROME_URL_PATTERN, CHROME_REV_PATTERN), 87 'chrome': (CHROME_TRUNK, CHROME_URL_PATTERN, CHROME_REV_PATTERN),
85 } 88 }
86 89
87 # List of components to update. 90 # List of components to update.
88 UPDATE_LIST = [ 91 UPDATE_LIST = [
89 # (component, remote subpath, local path, local readme file, depth) 92 # (component, remote subpath, local path, local readme file, depth)
90 93
91 # WebKit IDL. 94 # WebKit IDL.
92 ('webkit', WEBCORE_SUBPATH, os.path.join(LOCAL_WEBKIT_IDL_PATH, 'core'), LOC AL_WEBKIT_README, 95 ('webkit', WEBCORE_SUBPATH, os.path.join(LOCAL_WEBKIT_IDL_PATH, 'core'),
96 LOCAL_WEBKIT_README, DEPTH_INFINITY),
97 ('webkit', MODULES_SUBPATH, os.path.join(LOCAL_WEBKIT_IDL_PATH, 'modules'),
98 LOCAL_WEBKIT_README, DEPTH_INFINITY),
99 ('webkit', BINDINGS_SUBPATH, os.path.join(LOCAL_WEBKIT_IDL_PATH, 'bindings') ,
100 LOCAL_WEBKIT_README, DEPTH_INFINITY),
93 101
94 DEPTH_INFINITY),
95 ('webkit', MODULES_SUBPATH, os.path.join(LOCAL_WEBKIT_IDL_PATH, 'modules'), LOCAL_WEBKIT_README,
96 DEPTH_INFINITY),
97 # Chrome IDL. 102 # Chrome IDL.
98 ('chrome', CHROME_IDL_SUBPATH, LOCAL_CHROME_IDL_PATH, LOCAL_CHROME_README, 103 ('chrome', CHROME_IDL_SUBPATH, LOCAL_CHROME_IDL_PATH, LOCAL_CHROME_README,
99 DEPTH_INFINITY), 104 DEPTH_INFINITY),
100 # Chrome PPAPI generators. Contains idl_parser.py which is used by the 105 # Chrome PPAPI generators. Contains idl_parser.py which is used by the
101 # Chrome IDL compiler. 106 # Chrome IDL compiler.
102 ('chrome', CHROME_IDL_PARSER_SUBPATH, LOCAL_CHROME_IDL_PARSER_PATH, 107 ('chrome', CHROME_IDL_PARSER_SUBPATH, LOCAL_CHROME_IDL_PARSER_PATH,
103 LOCAL_CHROME_README, DEPTH_FILES), 108 LOCAL_CHROME_README, DEPTH_FILES),
104 # ply files. 109 # ply files.
105 ('chrome', CHROME_PLY_SUBPATH, LOCAL_CHROME_PLY_PATH, LOCAL_CHROME_README, 110 ('chrome', CHROME_PLY_SUBPATH, LOCAL_CHROME_PLY_PATH, LOCAL_CHROME_README,
106 DEPTH_INFINITY), 111 DEPTH_INFINITY),
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if revision is None: 230 if revision is None:
226 revision = latest 231 revision = latest
227 SaveVersionControlDir(local_path); 232 SaveVersionControlDir(local_path);
228 RefreshFiles(url, revision, remote_path, local_path, depth) 233 RefreshFiles(url, revision, remote_path, local_path, depth)
229 PruneExtraFiles(local_path) 234 PruneExtraFiles(local_path)
230 GenerateReadme(local_path, readme, url, revision) 235 GenerateReadme(local_path, readme, url, revision)
231 RestoreVersionControlDir(local_path); 236 RestoreVersionControlDir(local_path);
232 237
233 if __name__ == '__main__': 238 if __name__ == '__main__':
234 main() 239 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698