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

Side by Side Diff: tools/create_sdk.py

Issue 9569040: Clean up dom/html files packaged by the sdk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « frog/reader.dart ('k') | 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) 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 # 225 #
226 # Create and populate lib/html and lib/htmlimpl. 226 # Create and populate lib/html and lib/htmlimpl.
227 # 227 #
228 html_src_dir = join(HOME, 'client', 'html') 228 html_src_dir = join(HOME, 'client', 'html')
229 html_dest_dir = join(LIB, 'html') 229 html_dest_dir = join(LIB, 'html')
230 os.makedirs(html_dest_dir) 230 os.makedirs(html_dest_dir)
231 htmlimpl_dest_dir = join(LIB, 'htmlimpl') 231 htmlimpl_dest_dir = join(LIB, 'htmlimpl')
232 os.makedirs(htmlimpl_dest_dir) 232 os.makedirs(htmlimpl_dest_dir)
233 233
234 copyfile(join(html_src_dir, 'release', 'html.dart'), 234 copyfile(join(html_src_dir, 'release', 'html.dart'),
235 join(html_dest_dir, 'html.dart')) 235 join(html_dest_dir, 'html.dart'))
236 copyfile(join(html_src_dir, 'release', 'htmlimpl.dart'), 236 copyfile(join(html_src_dir, 'release', 'htmlimpl.dart'),
237 join(htmlimpl_dest_dir, 'htmlimpl.dart')) 237 join(htmlimpl_dest_dir, 'htmlimpl.dart'))
238 238
239 # TODO(dgrove): prune the correct files in html and htmlimpl.
240 for target_dir in [html_dest_dir, htmlimpl_dest_dir]:
241 copytree(join(html_src_dir, 'src'), join(target_dir, 'src'),
242 ignore=ignore_patterns('.svn'))
243 copytree(join(html_src_dir, 'generated'), join(target_dir, 'generated'),
244 ignore=ignore_patterns('.svn'))
245
246
247 # 239 #
248 # Create and populate lib/dom. 240 # Create and populate lib/dom.
249 # 241 #
250 dom_src_dir = join(HOME, 'client', 'dom') 242 dom_src_dir = join(HOME, 'client', 'dom')
251 dom_dest_dir = join(LIB, 'dom') 243 dom_dest_dir = join(LIB, 'dom')
252 os.makedirs(dom_dest_dir) 244 os.makedirs(dom_dest_dir)
253 245
254 for filename in os.listdir(dom_src_dir): 246 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'),
255 src_file = join(dom_src_dir, filename) 247 join(dom_dest_dir, 'dom_frog.dart'))
256 dest_file = join(dom_dest_dir, filename)
257 if filename.endswith('.dart') or filename.endswith('.js'):
258 copyfile(src_file, dest_file)
259 elif isdir(src_file):
260 if filename not in ['benchmarks', 'idl', 'scripts', 'snippets', '.svn']:
261 copytree(src_file, dest_file,
262 ignore=ignore_patterns('.svn', 'interface', 'wrapping',
263 '*monkey*'))
264 248
265 # 249 #
266 # Create and populate lib/{json, uri, utf8} . 250 # Create and populate lib/{json, uri, utf8} .
267 # 251 #
268 252
269 for library in ['json', 'uri', 'utf8']: 253 for library in ['json', 'uri', 'utf8']:
270 src_dir = join(HOME, 'lib', library) 254 src_dir = join(HOME, 'lib', library)
271 dest_dir = join(LIB, library) 255 dest_dir = join(LIB, library)
272 os.makedirs(dest_dir) 256 os.makedirs(dest_dir)
273 257
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 350
367 # Create and copy tools. 351 # Create and copy tools.
368 352
369 UTIL = join(SDK_tmp, 'util') 353 UTIL = join(SDK_tmp, 'util')
370 os.makedirs(UTIL) 354 os.makedirs(UTIL)
371 355
372 move(SDK_tmp, SDK) 356 move(SDK_tmp, SDK)
373 357
374 if __name__ == '__main__': 358 if __name__ == '__main__':
375 sys.exit(Main(sys.argv)) 359 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « frog/reader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698