summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-03-22 20:29:41 +0000
committerJames Cook <james@lindenlab.com>2007-03-22 20:29:41 +0000
commit25f95cd08f5e30a8b46b41cdc04b72cff8a731d5 (patch)
tree663e3509e99282cfec497daea38687bfcae6c03b /scripts
parentc93c38e047836e31dd34e33391a997d883777ae1 (diff)
SL-38184 Make python scripts in linden/scripts run in place without PYTHONPATH or symlinks. Reviewed with Donovan.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setup-path.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/setup-path.py b/scripts/setup-path.py
new file mode 100755
index 0000000000..297cd27345
--- /dev/null
+++ b/scripts/setup-path.py
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+# Get the python library directory in the path, so we don't have
+# to screw with PYTHONPATH or symbolic links. JC
+import sys
+from os.path import realpath, dirname, join
+
+# Walk back to checkout base directory
+dir = dirname(dirname(realpath(__file__)))
+# Walk in to libraries directory
+dir = join(join(join(dir, 'indra'), 'lib'), 'python')
+
+if dir not in sys.path:
+ sys.path.insert(0, dir)