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

Side by Side Diff: mojo/public/tools/bindings/mojom_bindings_generator.py

Issue 1530433002: Remove directories in mojo/public/third_party that just mirrored third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with fixes Created 5 years 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """The frontend for the Mojo bindings system.""" 6 """The frontend for the Mojo bindings system."""
7 7
8 8
9 import argparse 9 import argparse
10 import imp 10 import imp
(...skipping 10 matching lines...) Expand all
21 path = os.path.abspath(__file__) 21 path = os.path.abspath(__file__)
22 while True: 22 while True:
23 path, tail = os.path.split(path) 23 path, tail = os.path.split(path)
24 assert tail 24 assert tail
25 if tail == dirname: 25 if tail == dirname:
26 return path 26 return path
27 27
28 # Manually check for the command-line flag. (This isn't quite right, since it 28 # Manually check for the command-line flag. (This isn't quite right, since it
29 # ignores, e.g., "--", but it's close enough.) 29 # ignores, e.g., "--", but it's close enough.)
30 if "--use_bundled_pylibs" in sys.argv[1:]: 30 if "--use_bundled_pylibs" in sys.argv[1:]:
31 sys.path.insert(0, os.path.join(_GetDirAbove("public"), "public/third_party")) 31 sys.path.insert(0, os.path.join(_GetDirAbove("mojo"), "third_party"))
32 32
33 sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 33 sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)),
34 "pylib")) 34 "pylib"))
35 35
36 from mojom.error import Error 36 from mojom.error import Error
37 import mojom.fileutil as fileutil 37 import mojom.fileutil as fileutil
38 from mojom.generate.data import OrderedModuleFromData 38 from mojom.generate.data import OrderedModuleFromData
39 from mojom.parse.parser import Parse 39 from mojom.parse.parser import Parse
40 from mojom.parse.translate import Translate 40 from mojom.parse.translate import Translate
41 41
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 processor = MojomProcessor(lambda filename: filename in args.filename) 204 processor = MojomProcessor(lambda filename: filename in args.filename)
205 for filename in args.filename: 205 for filename in args.filename:
206 processor.ProcessFile(args, remaining_args, generator_modules, filename) 206 processor.ProcessFile(args, remaining_args, generator_modules, filename)
207 207
208 return 0 208 return 0
209 209
210 210
211 if __name__ == "__main__": 211 if __name__ == "__main__":
212 sys.exit(main()) 212 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/public/third_party/ply/yacc.py ('k') | mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698