Index: tools/fix_pythonpath.py |
diff --git a/tools/fix_pythonpath.py b/tools/fix_pythonpath.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..196aa878c4f036304d476647a07246a5330f6740 |
--- /dev/null |
+++ b/tools/fix_pythonpath.py |
@@ -0,0 +1,20 @@ |
+#!/usr/bin/env python |
borenet
2014/06/23 20:06:30
For convenience.
|
+# 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. |
+ |
+ |
+"""Adjust the PYTHONPATH appropriately.""" |
rmistry
2014/06/24 18:31:05
What you are doing here is including the root chec
borenet
2014/06/24 19:17:31
Adjusted the wording but did not specify that the
|
+ |
+ |
+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) |
rmistry
2014/06/24 18:31:05
I am not clear about how this module will be used.
borenet
2014/06/24 19:17:31
I expect that scripts will import it. I added the
|