pypa/pip — pull request #1176 by qwcode (2013-08-31 15:23:38+00:00)
Title: fix --user script installs for wheels

fixes #1163 (for 1.4.2)

this makes `pip.locations.distutils_scheme` not override "scripts" using pip's legacy `bin_py` logic.

I want to do more in develop (see concerns below), but want this to be minimal for the 1.4.2 patch release.
`distutils_scheme` is currently only used for wheel installs (not uninstalls), and for getting lib_path for --target installs

the concerns:

- the use of distutils' Distribution class over the setuptools version in `distutils_scheme` (which btw, was taken from the wheel project)
- the legacy `bin_py` logic needs to be dropped and defer to something like `distutils_scheme`
- `distutils_scheme` has side-effects. it potentially creates the home dir or user base dir.
- the awkwardness of creating a distutils install command to get at the scheme (although I can understand why)