| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 23 matching lines...) Expand all Loading... |
| 34 # ......html/ | 34 # ......html/ |
| 35 # ........html.dart | 35 # ........html.dart |
| 36 # ......htmlimpl/ | 36 # ......htmlimpl/ |
| 37 # ........htmlimpl.dart | 37 # ........htmlimpl.dart |
| 38 # ......json/ | 38 # ......json/ |
| 39 # ........json_frog.dart | 39 # ........json_frog.dart |
| 40 #.........json.dart | 40 #.........json.dart |
| 41 # ........{frog}/ | 41 # ........{frog}/ |
| 42 # ......uri/ | 42 # ......uri/ |
| 43 # ........uri.dart | 43 # ........uri.dart |
| 44 # ......utf8/ | 44 # ......utf/ |
| 45 # ........utf8.dart | |
| 46 # ......(more will come here) | 45 # ......(more will come here) |
| 47 # ....util/ | 46 # ....util/ |
| 48 # ......(more will come here) | 47 # ......(more will come here) |
| 49 | 48 |
| 50 | 49 |
| 51 | 50 |
| 52 import os | 51 import os |
| 53 import re | 52 import re |
| 54 import sys | 53 import sys |
| 55 import tempfile | 54 import tempfile |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 dest_file = join(dom_dest_dir, filename) | 251 dest_file = join(dom_dest_dir, filename) |
| 253 if filename.endswith('.dart') or filename.endswith('.js'): | 252 if filename.endswith('.dart') or filename.endswith('.js'): |
| 254 copyfile(src_file, dest_file) | 253 copyfile(src_file, dest_file) |
| 255 elif isdir(src_file): | 254 elif isdir(src_file): |
| 256 if filename not in ['benchmarks', 'idl', 'scripts', 'snippets', '.svn']: | 255 if filename not in ['benchmarks', 'idl', 'scripts', 'snippets', '.svn']: |
| 257 copytree(src_file, dest_file, | 256 copytree(src_file, dest_file, |
| 258 ignore=ignore_patterns('.svn', 'interface', 'wrapping', | 257 ignore=ignore_patterns('.svn', 'interface', 'wrapping', |
| 259 '*monkey*')) | 258 '*monkey*')) |
| 260 | 259 |
| 261 # | 260 # |
| 262 # Create and populate lib/{json, uri, utf8} . | 261 # Create and populate lib/{json, uri, utf} . |
| 263 # | 262 # |
| 264 | 263 |
| 265 for library in ['json', 'uri', 'utf8']: | 264 for library in ['json', 'uri', 'utf']: |
| 266 src_dir = join(HOME, 'lib', library) | 265 src_dir = join(HOME, 'lib', library) |
| 267 dest_dir = join(LIB, library) | 266 dest_dir = join(LIB, library) |
| 268 os.makedirs(dest_dir) | 267 os.makedirs(dest_dir) |
| 269 | 268 |
| 270 for filename in os.listdir(src_dir): | 269 for filename in os.listdir(src_dir): |
| 271 if filename.endswith('.dart'): | 270 if filename.endswith('.dart'): |
| 272 copyfile(join(src_dir, filename), join(dest_dir, filename)) | 271 copyfile(join(src_dir, filename), join(dest_dir, filename)) |
| 273 | 272 |
| 274 # | 273 # |
| 275 # Create and populate lib/core. | 274 # Create and populate lib/core. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 357 |
| 359 # Create and copy tools. | 358 # Create and copy tools. |
| 360 | 359 |
| 361 UTIL = join(SDK_tmp, 'util') | 360 UTIL = join(SDK_tmp, 'util') |
| 362 os.makedirs(UTIL) | 361 os.makedirs(UTIL) |
| 363 | 362 |
| 364 move(SDK_tmp, SDK) | 363 move(SDK_tmp, SDK) |
| 365 | 364 |
| 366 if __name__ == '__main__': | 365 if __name__ == '__main__': |
| 367 sys.exit(Main(sys.argv)) | 366 sys.exit(Main(sys.argv)) |
| OLD | NEW |