aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-12-18 08:38:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-12-18 08:38:56 -0500
commit53e5575e11a35aaf761da56aa6728cdcd7c04ec0 (patch)
tree71a4ba37cda11f3a8bc5ba8ccf993b2bb6c31dd4
parent127dcab577c72c85dc27dfb29701b67aaa41dd68 (diff)
downloadexternal_python_setuptools-53e5575e11a35aaf761da56aa6728cdcd7c04ec0.tar.gz
external_python_setuptools-53e5575e11a35aaf761da56aa6728cdcd7c04ec0.tar.bz2
external_python_setuptools-53e5575e11a35aaf761da56aa6728cdcd7c04ec0.zip
When invoking rmtree, ensure the parameter is unicode to avoid errors when the tree contains Unicode filenames. Fixes #704.
-rwxr-xr-xsetuptools/command/easy_install.py3
-rw-r--r--setuptools/tests/test_easy_install.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 03dd6768..7d982d89 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -666,6 +666,9 @@ class easy_install(Command):
finally:
if os.path.exists(tmpdir):
+ # workaround for http://bugs.python.org/issue24672
+ if six.PY2:
+ tmpdir = six.u(tmpdir)
rmtree(tmpdir)
def install_item(self, spec, download, tmpdir, deps, install_needed=False):
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 209e6b78..08138efc 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -169,10 +169,8 @@ class TestEasyInstallTest:
sdist_zip.close()
return str(sdist)
- @pytest.mark.xfail(reason="#709 and #710")
- # also
- #@pytest.mark.xfail(setuptools.tests.is_ascii,
- # reason="https://github.com/pypa/setuptools/issues/706")
+ @pytest.mark.xfail(setuptools.tests.is_ascii,
+ reason="https://github.com/pypa/setuptools/issues/706")
def test_unicode_filename_in_sdist(self, sdist_unicode, tmpdir, monkeypatch):
"""
The install command should execute correctly even if