SL-38184 Make python scripts in linden/scripts run in place without PYTHONPATH or symlinks. Reviewed with Donovan.

meow-7.2.2
James Cook 2007-03-22 20:29:41 +00:00
parent c93c38e047
commit 25f95cd08f
1 changed files with 13 additions and 0 deletions

13
scripts/setup-path.py Executable file
View File

@ -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)