pypa/pip — pull request #2007 by jonparrott (2014-08-31 00:21:40+00:00)
Title: Fixing issues with install's --target option.

1. Check for the existence of a directory before copying from temporary directory to final target. If it exists, warn the user.
2. If the user specifies the --upgrade option and the directory exists, delete it and continue with installation.
3. Adding tests for above cases.

This resolves #1489, #1710 completely and parts of #1833.