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

Unified Diff: download_appengine_sdk.py

Issue 25857002: Adding apprtc and downloading of google appengine sdk to webrtc.DEPS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webrtc/webrtc.DEPS/
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | google-appengine.zip.sha1 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_appengine_sdk.py
===================================================================
--- download_appengine_sdk.py (revision 0)
+++ download_appengine_sdk.py (revision 0)
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Downloads the appengine SDK from WebRTC storage and unpacks it.
+
+Requires that depot_tools is installed and in the PATH."""
+
+import os
+import sys
+import subprocess
+import zipfile
+
+
+def _DownloadAppEngineZipFile(webrtc_deps_path):
+ print 'Downloading files in %s...' % webrtc_deps_path
+ cmd = ['download_from_google_storage.py',
+ '--bucket=chromium-webrtc-resources',
+ '--directory', webrtc_deps_path]
+ 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!
+
+
+def _Unzip(path):
+ print 'Unzipping %s...' % path
+ zip_file = zipfile.ZipFile(path)
+ try:
+ zip_file.extractall()
+ finally:
+ zip_file.close()
+
+
+def main(argv):
+ if len(argv) == 1:
+ return 'Usage: %s <path to webrtc.DEPS>' % argv[0]
+
+ webrtc_deps_path = argv[1]
+ _DownloadAppEngineZipFile(webrtc_deps_path)
+ _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.
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
Property changes on: download_appengine_sdk.py
___________________________________________________________________
Added: svn:eol-style
+ LF
Added: svn:executable
+ *
« no previous file with comments | « DEPS ('k') | google-appengine.zip.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698