From 20aca0e37e2003a364098a27189c732197ccbec2 Mon Sep 17 00:00:00 2001 From: Emil Styrke Date: Mon, 27 Feb 2017 14:15:39 +0100 Subject: Fix for auto_chmod behavior Apparently, in (at least) python 3.5.2, the function that is called on Windows to remove files is os.unlink and not os.remove. This results in permission errors when trying to clean up after easy_install has been used to install a package from a Git repository. --- setuptools/command/easy_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/easy_install.py') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index f5ca0754..ef83f7ae 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1675,7 +1675,7 @@ def _first_line_re(): def auto_chmod(func, arg, exc): - if func is os.remove and os.name == 'nt': + if func in [os.unlink, os.remove] and os.name == 'nt': chmod(arg, stat.S_IWRITE) return func(arg) et, ev, _ = sys.exc_info() -- cgit v1.2.3