Bug 857186: Make virtualenv paths relative. r=gps

This commit is contained in:
Kyle Huey 2013-04-03 09:57:11 -07:00
Родитель 315c8e8757
Коммит e66babb941
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -210,7 +210,11 @@ class VirtualenvManager(object):
path = os.path.join(self.topsrcdir, package[1]) path = os.path.join(self.topsrcdir, package[1])
with open(os.path.join(python_lib, package[0]), 'a') as f: 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 return True