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

Side by Side Diff: tools/create_sdk.py

Issue 12782016: Switch pkg packages, pub, and dartdoc to use package: imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
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 20 matching lines...) Expand all
31 # ......html/ 31 # ......html/
32 # ......io/ 32 # ......io/
33 # ......isolate/ 33 # ......isolate/
34 # ......json/ 34 # ......json/
35 # ......math/ 35 # ......math/
36 # ......mirrors/ 36 # ......mirrors/
37 # ......uri/ 37 # ......uri/
38 # ......utf/ 38 # ......utf/
39 # ......scalarlist/ 39 # ......scalarlist/
40 # ......typeddata/ 40 # ......typeddata/
41 # ....pkg/ 41 # ....packages/
Bob Nystrom 2013/03/26 01:55:44 Can you run this by Dan too? I'm going to guess he
nweiz 2013/03/26 02:09:53 He's already a reviewer.
42 # ......args/ 42 # ......args/
43 # ......intl/ 43 # ......intl/
44 # ......logging/ 44 # ......logging/
45 # ......meta/ 45 # ......meta/
46 # ......serialization 46 # ......serialization
47 # ......unittest/ 47 # ......unittest/
48 # ......(more will come here) 48 # ......(more will come here)
49 # ....util/ 49 # ....util/
50 # ......analyzer/ 50 # ......analyzer/
51 # ........dart_analyzer.jar 51 # ........dart_analyzer.jar
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), 208 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'),
209 'json', 'math', 'mirrors', 'scalarlist', 'typeddata', 209 'json', 'math', 'mirrors', 'scalarlist', 'typeddata',
210 join('svg', 'dart2js'), join('svg', 'dartium'), 210 join('svg', 'dart2js'), join('svg', 'dartium'),
211 'uri', 'utf', 211 'uri', 'utf',
212 join('web_audio', 'dart2js'), join('web_audio', 'dartium'), 212 join('web_audio', 'dart2js'), join('web_audio', 'dartium'),
213 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]: 213 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]:
214 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), 214 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library),
215 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) 215 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh'))
216 216
217 217
218 # Create and copy pkg. 218 # Create and copy packages.
219 PKG = join(SDK_tmp, 'pkg') 219 PACKAGES = join(SDK_tmp, 'packages')
220 os.makedirs(PKG) 220 os.makedirs(PACKAGES)
221 221
222 # 222 #
223 # Create and populate pkg/{args, intl, logging, meta, unittest, ...} 223 # Create and populate packages/{args, intl, logging, meta, unittest, ...}
224 # 224 #
225 225
226 for library in ['args', 'http', 'intl', 'logging', 'meta', 'oauth2', 'pathos', 226 for library in ['args', 'http', 'intl', 'logging', 'meta', 'oauth2', 'pathos',
227 'serialization', 'unittest', 'yaml']: 227 'serialization', 'unittest', 'yaml']:
228 228
229 copytree(join(HOME, 'pkg', library), join(PKG, library), 229 copytree(join(HOME, 'pkg', library, 'lib'), join(PACKAGES, library))
230 ignore=ignore_patterns('*.svn', 'doc', 'docs',
231 '*.py', '*.gypi', '*.sh', 'packages'))
232 230
233 # Create and copy tools. 231 # Create and copy tools.
234 UTIL = join(SDK_tmp, 'util') 232 UTIL = join(SDK_tmp, 'util')
235 os.makedirs(UTIL) 233 os.makedirs(UTIL)
236 234
237 # Create and copy Analyzer library into 'util' 235 # Create and copy Analyzer library into 'util'
238 ANALYZER_DEST = join(UTIL, 'analyzer') 236 ANALYZER_DEST = join(UTIL, 'analyzer')
239 os.makedirs(ANALYZER_DEST) 237 os.makedirs(ANALYZER_DEST)
240 238
241 analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer', 239 analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer',
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 # Copy dart2js/dartdoc/pub. 273 # Copy dart2js/dartdoc/pub.
276 CopyDartScripts(HOME, build_dir, SDK_tmp, version) 274 CopyDartScripts(HOME, build_dir, SDK_tmp, version)
277 275
278 # Fix up dartdoc. 276 # Fix up dartdoc.
279 # TODO(dgrove): Remove this once issue 6619 is fixed. 277 # TODO(dgrove): Remove this once issue 6619 is fixed.
280 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', 278 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc',
281 'bin', 'dartdoc.dart'), 279 'bin', 'dartdoc.dart'),
282 join(SDK_tmp, 'lib', '_internal', 'dartdoc', 280 join(SDK_tmp, 'lib', '_internal', 'dartdoc',
283 'lib', 'universe_serializer.dart')], [ 281 'lib', 'universe_serializer.dart')], [
284 ("../../../../../pkg/args/lib/args.dart", 282 ("../../../../../pkg/args/lib/args.dart",
285 "../../../../pkg/args/lib/args.dart"), 283 "package:args/args.dart"),
286 ("../../../../../pkg/pathos/lib/path.dart", 284 ("../../../../../pkg/pathos/lib/path.dart",
287 "../../../../pkg/pathos/lib/path.dart"), 285 "package:pathos/path.dart"),
Bob Nystrom 2013/03/26 01:55:44 Are these even still necessary?
nweiz 2013/03/26 02:09:53 Good point, they are not.
288 ]) 286 ])
289 287
290 # Write the 'version' file 288 # Write the 'version' file
291 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w') 289 versionFile = open(os.path.join(SDK_tmp, 'version'), 'w')
292 versionFile.write(version + '\n') 290 versionFile.write(version + '\n')
293 versionFile.close() 291 versionFile.close()
294 292
295 # Write the 'revision' file 293 # Write the 'revision' file
296 revision = utils.GetSVNRevision() 294 revision = utils.GetSVNRevision()
297 295
298 if revision is not None: 296 if revision is not None:
299 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 297 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
300 f.write(revision + '\n') 298 f.write(revision + '\n')
301 f.close() 299 f.close()
302 300
303 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) 301 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
304 302
305 move(SDK_tmp, SDK) 303 move(SDK_tmp, SDK)
306 304
307 if __name__ == '__main__': 305 if __name__ == '__main__':
308 sys.exit(Main(sys.argv)) 306 sys.exit(Main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698