Commit 6c6f4caa authored by Jason R. Coombs's avatar Jason R. Coombs

Move toward future compatibility using unicode strings, but cast to native str...

Move toward future compatibility using unicode strings, but cast to native str as workaround for #709, #710, and #712.
parent 674d5ecb
......@@ -629,16 +629,12 @@ class easy_install(Command):
@contextlib.contextmanager
def _tmpdir(self):
tmpdir = tempfile.mkdtemp(prefix="easy_install-")
tmpdir = tempfile.mkdtemp(prefix=six.u("easy_install-"))
try:
yield tmpdir
# cast to str as workaround for #709 and #710 and #712
yield str(tmpdir)
finally:
if not os.path.exists(tmpdir):
return
# workaround for http://bugs.python.org/issue24672
if six.PY2:
tmpdir = tmpdir.decode('ascii')
rmtree(tmpdir)
os.path.exists(tmpdir) and rmtree(tmpdir)
def easy_install(self, spec, deps=False):
if not self.editable:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment