From 53e5575e11a35aaf761da56aa6728cdcd7c04ec0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 18 Dec 2016 08:38:56 -0500 Subject: When invoking rmtree, ensure the parameter is unicode to avoid errors when the tree contains Unicode filenames. Fixes #704. --- setuptools/command/easy_install.py | 3 +++ setuptools/tests/test_easy_install.py | 6 ++---- 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 -- cgit v1.2.3