summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-08-19 19:36:06 +0100
committerJason R. Coombs <jaraco@jaraco.com>2015-08-19 19:36:06 +0100
commit134bdfd93da0dcdef4c28bb85148aa7d23bc5363 (patch)
treede8eb1e4d413939d989f343686572310bf7ea571
parent429a938eaaad58f0694c9c7ab2afc44ee6d11b2d (diff)
downloadpython-setuptools-bitbucket-134bdfd93da0dcdef4c28bb85148aa7d23bc5363.tar.gz
Do join late
-rwxr-xr-xsetuptools/command/easy_install.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index dfdd757e..4688cc42 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1530,9 +1530,8 @@ class PthDistributions(Environment):
if not self.dirty:
return
- rel_paths = map(self.make_relative, self.paths)
- data = '\n'.join(rel_paths)
- if data:
+ rel_paths = list(map(self.make_relative, self.paths))
+ if rel_paths:
log.debug("Saving %s", self.filename)
data = (
"import sys; sys.__plen = len(sys.path)\n"
@@ -1541,7 +1540,7 @@ class PthDistributions(Environment):
" del sys.path[sys.__plen:];"
" p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;"
" sys.__egginsert = p+len(new)\n"
- ) % data
+ ) % '\n'.join(rel_paths)
if os.path.islink(self.filename):
os.unlink(self.filename)