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

Side by Side Diff: build/android/play_services/preprocess.py

Issue 1571803002: [Android] Prepare build/android/ for catapult+devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-device-library-links
Patch Set: rebase Created 4 years, 11 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 | « build/android/method_count.py ('k') | build/android/play_services/update.py » ('j') | 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 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 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 '''Prepares the Google Play services split client libraries before usage by 7 '''Prepares the Google Play services split client libraries before usage by
8 Chrome's build system. 8 Chrome's build system.
9 9
10 We need to preprocess Google Play services before using it in Chrome 10 We need to preprocess Google Play services before using it in Chrome
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 import os 54 import os
55 import shutil 55 import shutil
56 import stat 56 import stat
57 import sys 57 import sys
58 import tempfile 58 import tempfile
59 import zipfile 59 import zipfile
60 60
61 from datetime import datetime 61 from datetime import datetime
62 62
63 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) 63 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
64 import devil_chromium
64 from devil.utils import cmd_helper 65 from devil.utils import cmd_helper
65 from play_services import utils 66 from play_services import utils
66 from pylib.utils import argparse_utils 67 from pylib.utils import argparse_utils
67 68
68 69
69 M2_PKG_PATH = os.path.join('com', 'google', 'android', 'gms') 70 M2_PKG_PATH = os.path.join('com', 'google', 'android', 'gms')
70 71
71 72
72 def main(): 73 def main():
73 parser = argparse.ArgumentParser(description=( 74 parser = argparse.ArgumentParser(description=(
(...skipping 22 matching lines...) Expand all
96 '--is-extracted-repo', 97 '--is-extracted-repo',
97 action='store_true', 98 action='store_true',
98 help='the provided repository is not made of AAR files') 99 help='the provided repository is not made of AAR files')
99 parser.add_argument('--config-help', 100 parser.add_argument('--config-help',
100 action='custom_help', 101 action='custom_help',
101 custom_help_text=utils.ConfigParser.__doc__, 102 custom_help_text=utils.ConfigParser.__doc__,
102 help='show the configuration file format help') 103 help='show the configuration file format help')
103 104
104 args = parser.parse_args() 105 args = parser.parse_args()
105 106
107 devil_chromium.Initialize()
108
106 return ProcessGooglePlayServices(args.repository, 109 return ProcessGooglePlayServices(args.repository,
107 args.out_dir, 110 args.out_dir,
108 args.config_file, 111 args.config_file,
109 args.is_extracted_repo) 112 args.is_extracted_repo)
110 113
111 114
112 def ProcessGooglePlayServices(repo, out_dir, config_path, is_extracted_repo): 115 def ProcessGooglePlayServices(repo, out_dir, config_path, is_extracted_repo):
113 config = utils.ConfigParser(config_path) 116 config = utils.ConfigParser(config_path)
114 117
115 tmp_root = tempfile.mkdtemp() 118 tmp_root = tempfile.mkdtemp()
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 254
252 config.UpdateVersionNumber(play_services_full_version) 255 config.UpdateVersionNumber(play_services_full_version)
253 256
254 257
255 def _ExtractAll(zip_path, out_path): 258 def _ExtractAll(zip_path, out_path):
256 with zipfile.ZipFile(zip_path, 'r') as zip_file: 259 with zipfile.ZipFile(zip_path, 'r') as zip_file:
257 zip_file.extractall(out_path) 260 zip_file.extractall(out_path)
258 261
259 if __name__ == '__main__': 262 if __name__ == '__main__':
260 sys.exit(main()) 263 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/method_count.py ('k') | build/android/play_services/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698