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

Side by Side Diff: tools/create_sdk.py

Issue 10827349: Do not put runtime patch files in the SDK. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 # Create and populate lib/coreimpl. 400 # Create and populate lib/coreimpl.
401 # 401 #
402 402
403 # First, copy corelib/src/implementation to corelib/runtime. 403 # First, copy corelib/src/implementation to corelib/runtime.
404 for filename in coreimpl_sources: 404 for filename in coreimpl_sources:
405 for target_dir in ['runtime']: 405 for target_dir in ['runtime']:
406 copyfile(join('corelib', 'src', 'implementation', filename), 406 copyfile(join('corelib', 'src', 'implementation', filename),
407 join(coreimpl_dest_dir, target_dir, filename)) 407 join(coreimpl_dest_dir, target_dir, filename))
408 408
409 for filename in coreimpl_runtime_sources: 409 for filename in coreimpl_runtime_sources:
410 if filename.endswith('.dart'): 410 if filename.endswith('.dart') and not filename.endswith('_patch.dart')::
411 copyfile(join('runtime', 'lib', filename), 411 copyfile(join('runtime', 'lib', filename),
412 join(coreimpl_dest_dir, 'runtime', filename)) 412 join(coreimpl_dest_dir, 'runtime', filename))
413 413
414 # Construct lib/coreimpl/coreimpl_runtime.dart from whole cloth. 414 # Construct lib/coreimpl/coreimpl_runtime.dart from whole cloth.
415 dest_file = open(join(coreimpl_dest_dir, 'coreimpl_runtime.dart'), 'w') 415 dest_file = open(join(coreimpl_dest_dir, 'coreimpl_runtime.dart'), 'w')
416 dest_file.write('#library("dart:coreimpl");\n') 416 dest_file.write('#library("dart:coreimpl");\n')
417 for filename in coreimpl_sources: 417 for filename in coreimpl_sources:
418 dest_file.write('#source("runtime/' + filename + '");\n') 418 dest_file.write('#source("runtime/' + filename + '");\n')
419 for filename in coreimpl_runtime_sources: 419 for filename in coreimpl_runtime_sources:
420 if filename.endswith('.dart'): 420 if filename.endswith('.dart') and not filename.endswith('_patch.dart')::
421 dest_file.write('#source("runtime/' + filename + '");\n') 421 dest_file.write('#source("runtime/' + filename + '");\n')
422 dest_file.close() 422 dest_file.close()
423 423
424 424
425 # Create and copy pkg. 425 # Create and copy pkg.
426 PKG = join(SDK_tmp, 'pkg') 426 PKG = join(SDK_tmp, 'pkg')
427 os.makedirs(PKG) 427 os.makedirs(PKG)
428 428
429 # 429 #
430 # Create and populate pkg/{i18n, logging} 430 # Create and populate pkg/{i18n, logging}
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 if revision is not None: 485 if revision is not None:
486 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 486 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
487 f.write(revision + '\n') 487 f.write(revision + '\n')
488 f.close() 488 f.close()
489 489
490 move(SDK_tmp, SDK) 490 move(SDK_tmp, SDK)
491 utils.Touch(os.path.join(SDK, 'create.stamp')) 491 utils.Touch(os.path.join(SDK, 'create.stamp'))
492 492
493 if __name__ == '__main__': 493 if __name__ == '__main__':
494 sys.exit(Main(sys.argv)) 494 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