Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

python_virtualenv doesn't install pip #57

Open
jblaine opened this issue May 16, 2016 · 5 comments
Open

python_virtualenv doesn't install pip #57

jblaine opened this issue May 16, 2016 · 5 comments

Comments

@jblaine
Copy link
Contributor

jblaine commented May 16, 2016

python_virtualenv with system_site_packages true is not behaving like virtualenv --system-site-packages

  python_runtime '2' do
    provider :system
  end

  python_virtualenv '/tmp/noodle' do
    user 'jblaine'
    system_site_packages true
  end
* python_virtualenv[/tmp/noodle] action create
  - Creating virtualenv at /tmp/noodle
  * python_runtime_pip[/tmp/noodle] action install (up to date)
  * python_package[setuptools] action install (up to date)
  * python_package[wheel] action install (up to date)
tmp:etc-metrics# ls noodle/bin
activate  activate.csh  activate.fish  activate_this.py  python  python2  python2.7  python-config
tmp:etc-metrics#

Contrast with:

tmp:etc-metrics# virtualenv without-poise --system-site-packages
New python executable in /tmp/without-poise/bin/python
Installing setuptools, pip, wheel...done.
tmp:etc-metrics# ls without-poise/bin
activate      activate.fish     easy_install      pip   pip2.7  python2    python-config
activate.csh  activate_this.py  easy_install-2.7  pip2  python  python2.7  wheel
tmp:etc-metrics# rm -rf without-poise/
@coderanger
Copy link
Member

Check if the pip module is present, the binary is both not used and unimportant.

@jblaine
Copy link
Contributor Author

jblaine commented May 16, 2016

Is it your intention then that a README.md update at some point will indicate that "There will never be a pip filesystem command installed in a python_virtualenv ... and all pip commands must be done via either python_package or python_execute (using a command of -m pip <pip_command_here> <pip_options_here>)" ?

@coderanger
Copy link
Member

This is standard usage for pip these days. The PyPA team has actually debated removing the binary because of how error prone it is compared to -m pip. I doubt that will actually happen for compat reasons but certainly never use it anymore.

@jblaine
Copy link
Contributor Author

jblaine commented Mar 30, 2017

I can appreciate discussion of future change, but all of our developers without exception still expect 'pip' to exist, so I respectfully disagree with your opinion that "the binary is both not used and unimportant".

@coderanger
Copy link
Member

Sorry, I meant specifically to the cookbook the binary is unimportant. It should be installed and visible normally modulo what provider you're using.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants