From e79f766f572f6540db4d09d8ffdc61e6daff66d0 Mon Sep 17 00:00:00 2001
From: Christian Goetze <cg@lindenlab.com>
Date: Fri, 25 Jul 2008 20:21:32 +0000
Subject: [PATCH] Tweak output of test_all_platforms.py

---
 scripts/update_version_files.py | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py
index 95ff19c65b3..528eedc23a3 100755
--- a/scripts/update_version_files.py
+++ b/scripts/update_version_files.py
@@ -4,10 +4,22 @@
 # instead of having to figure it out by hand
 #
 
-from os.path import realpath, dirname, join, exists
-setup_path = join(dirname(realpath(__file__)), "setup-path.py")
-if exists(setup_path):
-    execfile(setup_path)
+import sys
+import os
+import os.path
+
+root = os.path.abspath(__file__)
+while root != os.path.sep:
+    root = os.path.dirname(root)
+    dir = os.path.join(root, 'indra', 'lib', 'python')
+    if os.path.isdir(dir):
+        if dir not in sys.path:
+            sys.path.insert(0, dir)
+        break
+else:
+    print >>sys.stderr, "This script is not inside a valid installation."
+    sys.exit(1)
+
 import getopt, sys, os, re, commands
 from indra.util import llversion
 
-- 
GitLab