ansible/ansible — pull request #4413 by jerm (2013-10-09 17:01:31+00:00)
Title: Add capability to pass in a PATH prefix to run_command and allow pip module to utilize that to make virtualenv bin/ available in pip installs

Add capability to pass in a PATH prefix to run_command and allow pip module to utilize that to make virtualenv bin/ available in pip installs.

As I said in the commit comments, currently if installing a program into a virtualenv via pip, anything previously installed into that virtualenv's bin/ directory isn't available on the PATH of the run_command environment. This causes problems when, say, gevent wants to call cython during its install process. I didn't see any other way to go about getting the PATH info into run_command (happy to be corrected), so I added that parameter. I can't imagine it won't be useful in other places to be able to pass-in an ad-hoc search path, so i figured it was a reasonable addition.