Bug 857186: Make virtualenv paths relative. r=gps

This commit is contained in:
Kyle Huey 2013-04-03 09:57:11 -07:00
parent ca143c5fff
commit 27721da8dc

View File

@ -210,7 +210,11 @@ class VirtualenvManager(object):
path = os.path.join(self.topsrcdir, package[1])
with open(os.path.join(python_lib, package[0]), 'a') as f:
f.write("%s\n" % path)
# This path is relative to the .pth file. Using a
# relative path allows the srcdir/objdir combination
# to be moved around (as long as the paths relative to
# each other remain the same).
f.write("%s\n" % os.path.relpath(path, python_lib))
return True