Index: third_party/psutil/build.py |
diff --git a/third_party/psutil/build.py b/third_party/psutil/build.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..c933d2650b49011533193f288cf1c15570d4f09f |
--- /dev/null |
+++ b/third_party/psutil/build.py |
@@ -0,0 +1,27 @@ |
+#!/usr/bin/env python |
+# Copyright (c) 2011 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. |
+ |
+"""Simple helper script for building psutil via GYP.""" |
+ |
+import os |
+import subprocess |
+import sys |
+ |
+ |
+def Main(): |
+ if len(sys.argv) <= 1: |
+ 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.
|
+ sys.exit(1) |
+ |
+ # GYP may specify the output path as a relative path. Since we need cwd to be |
+ # the source directory, we must convert the output path to an absolute path. |
+ abs_out_path = os.path.abspath(sys.argv[1]) |
+ sys.exit(subprocess.call( |
+ ['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.
|
+ cwd=os.path.dirname(os.path.abspath(__file__)))) |
+ |
+ |
+if __name__ == '__main__': |
+ Main() |