Index: build/download_sdk_extras.py |
diff --git a/build/download_sdk_extras.py b/build/download_sdk_extras.py |
index d38ee8651de5833924ea402c599ed80b10947583..b5fa0825e81a47e1fa56e359f367f133e0eafba2 100755 |
--- a/build/download_sdk_extras.py |
+++ b/build/download_sdk_extras.py |
@@ -17,11 +17,15 @@ import subprocess |
import sys |
import zipfile |
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'android')) |
+script_dir = os.path.dirname(os.path.realpath(__file__)) |
kjellander_chromium
2015/02/17 21:32:59
These variables are usually uppercase (constants),
navabi
2015/02/17 21:44:05
Done.
|
+chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) |
+sys.path.insert(0, os.path.join(script_dir, 'android')) |
from pylib import constants |
nyquist
2015/02/17 21:37:05
Nit: Could this be moved one line down? I find it
navabi
2015/02/17 21:44:05
Done.
|
+sys.path.insert(1, os.path.join(chrome_src, 'tools')) |
+import find_depot_tools |
-GSUTIL_PATH = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, |
- os.pardir, os.pardir, os.pardir, os.pardir, 'depot_tools', 'gsutil.py') |
+DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() |
+GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') |
SDK_EXTRAS_BUCKET = 'gs://chrome-sdk-extras' |
SDK_EXTRAS_PATH = os.path.join(constants.ANDROID_SDK_ROOT, 'extras') |
SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), |
@@ -38,7 +42,7 @@ def clean_and_extract(dir_name, package_name, zip_file): |
def main(): |
- if not os.path.exists(GSUTIL_PATH) or not os.path.exists(SDK_EXTRAS_PATH): |
+ if not os.environ.get('CHROME_HEADLESS'): |
hinoka
2015/02/17 20:34:01
Or just check if GSUTIL_PATH exists?
we try to av
navabi
2015/02/17 20:38:24
I did that before. But this does not work on WebRT
hinoka
2015/02/17 20:40:59
Is switching to "find_depot_tools" sufficient?
navabi
2015/02/17 20:45:39
No. Because it will find_depot_tools for developer
hinoka
2015/02/17 21:29:08
Oh I see, auth issue.
|
# This is not a buildbot checkout. |
return 0 |
# Update the android_sdk_extras.json file to update downloaded packages. |