OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2011 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 """Simple helper script for building psutil via GYP.""" | |
7 | |
8 import os | |
9 import subprocess | |
10 import sys | |
11 | |
12 | |
13 def Main(): | |
14 if len(sys.argv) <= 1: | |
15 print 'usage: build.py <output dir>' | |
Nirnimesh
2011/12/07 00:30:41
print >>sys.stderr
s/usage/Usage/
DaleCurtis
2011/12/07 01:26:08
Done.
| |
16 sys.exit(1) | |
17 | |
18 # GYP may specify the output path as a relative path. Since we need cwd to be | |
19 # the source directory, we must convert the output path to an absolute path. | |
20 abs_out_path = os.path.abspath(sys.argv[1]) | |
21 sys.exit(subprocess.call( | |
22 ['python', 'setup.py', 'build', '--build-lib', abs_out_path], | |
Nirnimesh
2011/12/07 00:30:41
--build-lib still produces 'build' dir in cwd. You
DaleCurtis
2011/12/07 01:26:08
Done.
| |
23 cwd=os.path.dirname(os.path.abspath(__file__)))) | |
24 | |
25 | |
26 if __name__ == '__main__': | |
27 Main() | |
OLD | NEW |