blob: a1cc30ad5ff5307b104d6c69f56063997127e548 [file] [log] [blame]
# HG changeset patch
# User Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
# Date 1375688645 -7200
# Mon Aug 05 09:44:05 2013 +0200
# Node ID af6c2bd582e4ed09d30319c9742144c0491562af
# Parent 648bb1e6fcb9132483680998858f4b9e083e9c44
# Parent 13f77d26065af56983aeecc37021fbcbbad3fa99
Merged in mgorny/setuptools-overwrite-fix (pull request #10)
Unlink destination file before writing scripts.
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -799,6 +799,8 @@
mask = current_umask()
if not self.dry_run:
ensure_directory(target)
+ if os.path.exists(target):
+ os.unlink(target)
f = open(target,"w"+mode)
f.write(contents)
f.close()