From 88e5d1c9b68ef6c2161f08c6e62b62f2803c96ef Mon Sep 17 00:00:00 2001 From: Steven Myint Date: Tue, 25 Jun 2013 20:43:30 -0700 Subject: [PATCH] Keep symlinks as symlinks when installing Without this, "pip install" crashes when encountering symlinks that point to external paths. The culprit is "shutil.copytree()", which throws an error in such cases if the "symlinks" parameter is not set to "True". This fixes #1006. --- pip/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip/download.py b/pip/download.py index 653495f2a38..657a623fa0a 100644 --- a/pip/download.py +++ b/pip/download.py @@ -417,7 +417,7 @@ def unpack_file_url(link, location): # delete the location since shutil will create it again :( if os.path.isdir(location): rmtree(location) - shutil.copytree(source, location) + shutil.copytree(source, location, symlinks=True) else: unpack_file(source, location, content_type, link)