aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-12-21 14:15:37 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-12-21 14:39:59 -0500
commit5ad13718686bee04a93b4e86929c1bb170f14a52 (patch)
tree06dbea4dd959755a65ba2c9941d5942b98c3b91a /setuptools/command/easy_install.py
parenta17fa50d2675d89077be09d668a073c751b76e0c (diff)
downloadexternal_python_setuptools-5ad13718686bee04a93b4e86929c1bb170f14a52.tar.gz
external_python_setuptools-5ad13718686bee04a93b4e86929c1bb170f14a52.tar.bz2
external_python_setuptools-5ad13718686bee04a93b4e86929c1bb170f14a52.zip
Cast the value to rmtree to bytes on Linux and Python 2 when the filesystemencoding is ascii, and let posixpath work its voodoo. Fixes #706.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 14ad25c2..36e7f359 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -46,6 +46,7 @@ from setuptools.extern.six.moves import configparser, map
from setuptools import Command
from setuptools.sandbox import run_setup
from setuptools.py31compat import get_path, get_config_vars
+from setuptools.py27compat import rmtree_safe
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
from setuptools.package_index import (
@@ -634,7 +635,7 @@ class easy_install(Command):
# cast to str as workaround for #709 and #710 and #712
yield str(tmpdir)
finally:
- os.path.exists(tmpdir) and rmtree(tmpdir)
+ os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
def easy_install(self, spec, deps=False):
if not self.editable: