bin/allmydata-tahoe: also update PYTHONPATH so that child processes (like twistd) will work

This commit is contained in:
Brian Warner 2007-06-06 11:36:48 -07:00
parent 3c0485204e
commit e5fdf0daca

View File

@ -20,6 +20,14 @@ if len(where) >= 2 and where[-2] == "bin":
# we've found our home
libdir = os.path.join(base, "instdir", "lib")
sys.path.insert(0, libdir)
# also update PYTHONPATH so that child processes (like twistd) will
# use this too
pp = os.environ.get("PYTHONPATH")
if pp:
pp = libdir + ":" + pp
else:
pp = libdir
os.environ["PYTHONPATH"] = pp
from allmydata.scripts import runner
runner.run()