Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve pip path after creating virtualenv #900

Merged
merged 1 commit into from
Aug 18, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions library/pip
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def main():
out = ''

env = module.params['virtualenv']
pip = _find_pip(module, env)

if env:
virtualenv = _find_virtualenv(module)
Expand All @@ -112,6 +111,8 @@ def main():
out += out_venv
err += err_venv

pip = _find_pip(module, env)

state = module.params['state']
name = module.params['name']
version = module.params['version']
Expand Down Expand Up @@ -154,15 +155,15 @@ def main():
changed = 'Successfully installed' in out_pip

elif name:

installed = _is_package_installed(name, pip, version)
changed = ((installed and state == 'absent') or
(not installed and state == 'present'))

if changed:
if state == 'present':
full_name = _get_full_name(name, version)
else:
full_name = _get_full_name(name, version)
else:
full_name = name

cmd = '%s %s %s' % (pip, command_map[state], full_name)
Expand Down