Restore newlines to easy-install.pth files. (#3583)
Previous syntax fix in 8a873bb
was not quite right.
This commit is contained in:
parent
782f29bc4b
commit
dead67ae56
1 changed files with 6 additions and 2 deletions
|
@ -470,10 +470,14 @@ def write_easy_install_pth(self, exts):
|
|||
|
||||
else:
|
||||
with closing(open(main_pth, 'w')) as f:
|
||||
f.write("import sys; sys.__plen = len(sys.path)")
|
||||
f.write("import sys; sys.__plen = len(sys.path)\n")
|
||||
for path in paths:
|
||||
f.write("{0}\n".format(path))
|
||||
f.write("import sys; new = sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p = getattr(sys, '__egginsert', 0); sys.path[p:p] = new; sys.__egginsert = p + len(new)") # noqa: E501
|
||||
f.write("import sys; new=sys.path[sys.__plen:]; "
|
||||
"del sys.path[sys.__plen:]; "
|
||||
"p=getattr(sys,'__egginsert',0); "
|
||||
"sys.path[p:p]=new; "
|
||||
"sys.__egginsert = p+len(new)\n")
|
||||
|
||||
def activate(self, ext_pkg, **args):
|
||||
ignore = self.python_ignore(ext_pkg, args)
|
||||
|
|
Loading…
Reference in a new issue