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

Side by Side Diff: build_mercurial_local.py

Issue 759163003: Add infrastructure to download golang and build AppRTC collider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webrtc/webrtc.DEPS/
Patch Set: Created 6 years 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright 2014 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 """Builds a local mercurial (hg) copy.
7
8 This is used by the go toolchain.
9 """
10
11 import os
12 import shutil
13 import subprocess
14 import sys
15
16 import utils
17
18
19 def main():
20 if not os.path.exists('mercurial'):
21 return 'Expected mercurial at %s.' % os.path.abspath('mercurial')
22
23 os.chdir('mercurial')
24
25 if utils.GetPlatform() == 'win':
26 subprocess.check_call(['python', 'setup.py', '--pure', 'build_py', '-c',
27 '-d', '.', 'build_ext',
28 '-i', 'build_mo', '--force'])
kjellander_chromium 2014/12/08 13:58:08 where does the local copy end up? Doesn't it need
phoglund_chromium 2014/12/08 14:26:16 This makes the mercurial/hg python script work. It
29 with open('hg.bat', 'w') as put_hg_in_path:
30 # Write a hg.bat since the go toolchain expects to find something called
31 # 'hg' in the path, but Windows only recognizes executables ending with
32 # an extension in PATHEXT. Writing hg.bat effectively makes 'hg' callable
kjellander_chromium 2014/12/08 13:58:08 Maybe it would be easiert to add "py" to the PATHE
phoglund_chromium 2014/12/08 14:26:16 No, it's not the make that needs hg, it's golang w
33 # if the mercurial folder is in PATH.
34 mercurial_path = os.path.abspath('hg')
35 put_hg_in_path.write('python %s %%*' % mercurial_path)
36 else:
37 subprocess.check_call(['make', 'local'])
38
39 if __name__ == '__main__':
40 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698