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

Side by Side Diff: build/android/gyp/process_resources.py

Issue 1138383003: Prefer jinja2 from third_party over system library in process_resources.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« 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 Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Process Android resources to generate R.java, and prepare for packaging. 7 """Process Android resources to generate R.java, and prepare for packaging.
8 8
9 This will crunch images and generate v14 compatible resources 9 This will crunch images and generate v14 compatible resources
10 (see generate_v14_compatible_resources.py). 10 (see generate_v14_compatible_resources.py).
11 """ 11 """
12 12
13 import codecs 13 import codecs
14 import optparse 14 import optparse
15 import os 15 import os
16 import re 16 import re
17 import shutil 17 import shutil
18 import sys 18 import sys
19 import zipfile 19 import zipfile
20 20
21 import generate_v14_compatible_resources 21 import generate_v14_compatible_resources
22 22
23 from util import build_utils 23 from util import build_utils
24 24
25 # Import jinja2 from third_party/jinja2 25 # Import jinja2 from third_party/jinja2
26 sys.path.append(os.path.join(os.path.dirname(__file__), '../../../third_party')) 26 sys.path.insert(1,
27 os.path.join(os.path.dirname(__file__), '../../../third_party'))
27 from jinja2 import Template # pylint: disable=F0401 28 from jinja2 import Template # pylint: disable=F0401
28 29
29 30
30 def ParseArgs(args): 31 def ParseArgs(args):
31 """Parses command line options. 32 """Parses command line options.
32 33
33 Returns: 34 Returns:
34 An options object as from optparse.OptionsParser.parse_args() 35 An options object as from optparse.OptionsParser.parse_args()
35 """ 36 """
36 parser = optparse.OptionParser() 37 parser = optparse.OptionParser()
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if options.depfile: 413 if options.depfile:
413 input_files += build_utils.GetPythonDependencies() 414 input_files += build_utils.GetPythonDependencies()
414 build_utils.WriteDepfile(options.depfile, input_files) 415 build_utils.WriteDepfile(options.depfile, input_files)
415 416
416 if options.stamp: 417 if options.stamp:
417 build_utils.Touch(options.stamp) 418 build_utils.Touch(options.stamp)
418 419
419 420
420 if __name__ == '__main__': 421 if __name__ == '__main__':
421 main() 422 main()
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