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

Side by Side Diff: build/download_gold_plugin.py

Issue 1418513007: Move find_depot_tools.py to build/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/download_sdk_extras.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 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to download LLVM gold plugin from google storage.""" 6 """Script to download LLVM gold plugin from google storage."""
7 7
8 import find_depot_tools
8 import json 9 import json
9 import os 10 import os
10 import shutil 11 import shutil
11 import subprocess 12 import subprocess
12 import sys 13 import sys
13 import zipfile 14 import zipfile
14 15
15 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) 16 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
16 CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) 17 CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir))
17 sys.path.insert(0, os.path.join(CHROME_SRC, 'tools'))
18 18
19 import find_depot_tools
20 19
21 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path() 20 DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
22 GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py') 21 GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py')
23 22
24 LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build', 23 LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build',
25 'Release+Asserts') 24 'Release+Asserts')
26 CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts', 25 CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts',
27 'update.py') 26 'update.py')
28 CLANG_REVISION = os.popen(CLANG_UPDATE_PY + ' --print-revision').read().rstrip() 27 CLANG_REVISION = os.popen(CLANG_UPDATE_PY + ' --print-revision').read().rstrip()
29 28
(...skipping 11 matching lines...) Expand all
41 # stdin->stderr redirect in update.py to do something else (crbug.com/494442). 40 # stdin->stderr redirect in update.py to do something else (crbug.com/494442).
42 subprocess.check_call(['python', GSUTIL_PATH, 41 subprocess.check_call(['python', GSUTIL_PATH,
43 'cp', remote_path, targz_name], 42 'cp', remote_path, targz_name],
44 stderr=open('/dev/null', 'w')) 43 stderr=open('/dev/null', 'w'))
45 subprocess.check_call(['tar', 'xzf', targz_name]) 44 subprocess.check_call(['tar', 'xzf', targz_name])
46 os.remove(targz_name) 45 os.remove(targz_name)
47 return 0 46 return 0
48 47
49 if __name__ == '__main__': 48 if __name__ == '__main__':
50 sys.exit(main()) 49 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/download_sdk_extras.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698