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

Side by Side Diff: tools/create_sdk.py

Issue 10916151: Remove dart:dom from SDK (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 # A script which will be invoked from gyp to create an SDK. 7 # A script which will be invoked from gyp to create an SDK.
8 # 8 #
9 # Usage: create_sdk.py sdk_directory 9 # Usage: create_sdk.py sdk_directory
10 # 10 #
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 # Construct lib/io/io_runtime.dart from whole cloth. 210 # Construct lib/io/io_runtime.dart from whole cloth.
211 dest_file = open(join(io_dest_dir, 'io_runtime.dart'), 'a') 211 dest_file = open(join(io_dest_dir, 'io_runtime.dart'), 'a')
212 for filename in io_runtime_sources: 212 for filename in io_runtime_sources:
213 assert filename.endswith('.dart') 213 assert filename.endswith('.dart')
214 if filename == 'io.dart': 214 if filename == 'io.dart':
215 continue 215 continue
216 dest_file.write('#source("runtime/' + filename + '");\n') 216 dest_file.write('#source("runtime/' + filename + '");\n')
217 dest_file.close() 217 dest_file.close()
218 218
219 # 219 #
220 # Create and populate lib/dom.
221 #
222 dom_src_dir = join(HOME, 'lib', 'dom')
223 dom_dest_dir = join(LIB, 'dom')
224 os.makedirs(dom_dest_dir)
225
226 copyfile(join(dom_src_dir, 'dart2js', 'dom_dart2js.dart'),
227 join(dom_dest_dir, 'dom_dart2js.dart'))
228
229 #
230 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. 220 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}.
231 # 221 #
232 222
233 for library in ['_internal', 'compiler', 'config', 'html', 'core', 'coreimpl', 223 for library in ['_internal', 'compiler', 'config', 'html', 'core', 'coreimpl',
234 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf', 224 'crypto', 'isolate', 'json', 'math', 'mirrors', 'uri', 'utf',
235 'web']: 225 'web']:
236 copytree(join(HOME, 'lib', library), join(LIB, library), 226 copytree(join(HOME, 'lib', library), join(LIB, library),
237 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) 227 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh'))
238 228
239 # TODO(dgrove): fix this really ugly hack 229 # TODO(dgrove): fix this really ugly hack
240 ReplaceInFiles( 230 ReplaceInFiles(
241 [join(LIB, 'compiler', 'implementation', 'lib', 'io.dart')], 231 [join(LIB, 'compiler', 'implementation', 'lib', 'io.dart')],
242 [('../../runtime/bin', '../io/runtime')]) 232 [('../../runtime/bin', '../io/runtime')])
243 233
244 # Create and copy pkg. 234 # Create and copy pkg.
245 PKG = join(SDK_tmp, 'pkg') 235 PKG = join(SDK_tmp, 'pkg')
246 os.makedirs(PKG) 236 os.makedirs(PKG)
247 237
248 # 238 #
249 # Create and populate pkg/{args, intl, logging, unittest} 239 # Create and populate pkg/{args, intl, logging, unittest}
250 # 240 #
251 241
252 for library in ['args', 'dartdoc', 'intl', 'logging', 'unittest']: 242 for library in ['args', 'dartdoc', 'intl', 'logging', 'unittest']:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if revision is not None: 290 if revision is not None:
301 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 291 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
302 f.write(revision + '\n') 292 f.write(revision + '\n')
303 f.close() 293 f.close()
304 294
305 move(SDK_tmp, SDK) 295 move(SDK_tmp, SDK)
306 utils.Touch(os.path.join(SDK, 'create.stamp')) 296 utils.Touch(os.path.join(SDK, 'create.stamp'))
307 297
308 if __name__ == '__main__': 298 if __name__ == '__main__':
309 sys.exit(Main(sys.argv)) 299 sys.exit(Main(sys.argv))
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