Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """Downloads the appengine SDK from WebRTC storage and unpacks it. | |
| 7 | |
| 8 Requires that depot_tools is installed and in the PATH.""" | |
| 9 | |
| 10 import os | |
| 11 import sys | |
| 12 import subprocess | |
| 13 import zipfile | |
| 14 | |
| 15 | |
| 16 def _DownloadAppEngineZipFile(webrtc_deps_path): | |
| 17 print 'Downloading files in %s...' % webrtc_deps_path | |
| 18 cmd = ['download_from_google_storage.py', | |
| 19 '--bucket=chromium-webrtc-resources', | |
| 20 '--directory', webrtc_deps_path] | |
| 21 subprocess.check_call(cmd) | |
|
kjellander_chromium
2013/10/10 09:02:23
Does this work on windows without providing sys.ex
phoglund_chromium
2013/10/10 09:38:16
Nope, and if I do that I will have to locate depot
kjellander_chromium
2013/10/10 09:53:03
SG, great!
| |
| 22 | |
| 23 | |
| 24 def _Unzip(path): | |
| 25 print 'Unzipping %s...' % path | |
| 26 zip_file = zipfile.ZipFile(path) | |
| 27 try: | |
| 28 zip_file.extractall() | |
| 29 finally: | |
| 30 zip_file.close() | |
| 31 | |
| 32 | |
| 33 def main(argv): | |
| 34 if len(argv) == 1: | |
| 35 return 'Usage: %s <path to webrtc.DEPS>' % argv[0] | |
| 36 | |
| 37 webrtc_deps_path = argv[1] | |
| 38 _DownloadAppEngineZipFile(webrtc_deps_path) | |
| 39 _Unzip(os.path.join(webrtc_deps_path, 'google-appengine.zip')) | |
|
kjellander_chromium
2013/10/10 09:02:23
Hmm, is it the right thing to do to exact this int
phoglund_chromium
2013/10/10 09:38:16
It extracts into the level above the source contro
kjellander_chromium
2013/10/10 09:53:03
That sounds like the best approach, yes.
| |
| 40 | |
| 41 | |
| 42 if __name__ == '__main__': | |
| 43 sys.exit(main(sys.argv)) | |
| OLD | NEW |