- # we've found our home
- libdir = os.path.join(base, "instdir", "lib")
- sys.path.insert(0, libdir)
+ # we've found our home. Put the tahoe source at the front of sys.path
+ srcdir = os.path.join(base, "src")
+ sys.path.insert(0, srcdir)
+ # and put any support eggs at the end of sys.path
+ if sys.platform == "win32":
+ supportdir = os.path.join(base, "support", "Lib", "site-packages")
+ else:
+ supportdir = os.path.join(base, "support",
+ "lib",
+ "python%d.%d" % sys.version_info[:2],
+ "site-packages")
+ support_eggs = []
+ if os.path.exists(supportdir):
+ for fn in os.listdir(supportdir):
+ if fn.endswith(".egg"):
+ support_eggs.append(os.path.join(supportdir, fn))
+
+ sys.path.extend(support_eggs)
+