Index: tools/fix_pythonpath.py |
diff --git a/tools/fix_pythonpath.py b/tools/fix_pythonpath.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dfd1b480e10cd21dd68f585c431a28f11ef3eddb |
--- /dev/null |
+++ b/tools/fix_pythonpath.py |
@@ -0,0 +1,20 @@ |
+#!/usr/bin/env python |
+# Copyright (c) 2014 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. |
+ |
+ |
+"""Add commonly-used directories to PYTHONPATH.""" |
rmistry
2014/06/25 13:56:22
The problem with this module determining which dir
borenet
2014/06/25 14:53:32
I think the last idea sounds best to me: automatic
|
+ |
+ |
+import os |
+import sys |
+ |
+ |
+CHECKOUT_ROOT = os.path.realpath(os.path.join( |
+ os.path.dirname(os.path.abspath(__file__)), os.pardir)) |
+sys.path.insert(0, CHECKOUT_ROOT) |
+ |
+ |
+if __name__ == '__main__': |
+ print 'PYTHONPATH=%s' % ':'.join(sys.path) |