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

Side by Side Diff: build/android/gyp/util/build_utils.py

Issue 291963002: Convert apk-package-resources.xml to python (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import ast 5 import ast
6 import contextlib 6 import contextlib
7 import fnmatch 7 import fnmatch
8 import json 8 import json
9 import os 9 import os
10 import pipes 10 import pipes
11 import shlex 11 import shlex
12 import shutil 12 import shutil
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 import tempfile 15 import tempfile
16 import traceback
17 16
18 17
19 @contextlib.contextmanager 18 @contextlib.contextmanager
20 def TempDir(): 19 def TempDir():
21 dirname = tempfile.mkdtemp() 20 dirname = tempfile.mkdtemp()
22 try: 21 try:
23 yield dirname 22 yield dirname
24 finally: 23 finally:
25 shutil.rmtree(dirname) 24 shutil.rmtree(dirname)
26 25
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 non_system_module_paths = map(ConvertPycToPy, non_system_module_paths) 192 non_system_module_paths = map(ConvertPycToPy, non_system_module_paths)
194 return list(set(non_system_module_paths)) 193 return list(set(non_system_module_paths))
195 194
196 195
197 def WriteDepfile(path, dependencies): 196 def WriteDepfile(path, dependencies):
198 with open(path, 'w') as depfile: 197 with open(path, 'w') as depfile:
199 depfile.write(path) 198 depfile.write(path)
200 depfile.write(': ') 199 depfile.write(': ')
201 depfile.write(' '.join(dependencies)) 200 depfile.write(' '.join(dependencies))
202 depfile.write('\n') 201 depfile.write('\n')
OLDNEW
« no previous file with comments | « build/android/gyp/package_resources.py ('k') | build/java.gypi » ('j') | build/java_apk.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698