Allow more python_pip options, like --proxy #64

jblaine opened this Issue Dec 12, 2013 · 9 comments


None yet
4 participants

jblaine commented Dec 12, 2013

I can't make any use of python_pip, and therefore cannot make any use of any cookbook that makes use of python_pip (!!!), because it doesn't support the pip --proxy option. :(

brianz commented Dec 24, 2013

Another one which is a very very common and a deal breaker is not being able to install from a requirements file (-r option). I'm new to Chef and Ruby but will use this as and excuse to learn.


coderanger commented Dec 24, 2013

@brianz That comes up a lot and is unrelated. Requirements files should be their own resource, and until pip supports better programmatic access it is effectively impossible to make that resource usefully idempotent, and thus it would be no better than a simple execute resource, and thus I've not written it.

brianz commented Dec 24, 2013

That makes sense. Although, given a requirements file where every entry is versioned, a pip install would be idempotent. As you mention, that is impossible to guarantee and very easy to get wrong. If I understand the Chef mantra correctly anything less than a guarantee is not acceptable?


coderanger commented Dec 24, 2013

@brianz There is no way to know if a given requirements file is idempotent, so for example you can't know if you need to bounce a service because a library changed. It is on the roadmap for pip to eventually support getting to this information from external tools, but just low priority right now. Until then, there is no sane way to model requirements.txt in a declarative, idempotent system. The best you can do is trigger changes whenever the mtime on the file changes, and just accept the false positives.

I just don't think you understand the scope of this. Hardcoding required pip deps in chef is ludicrous for every app it might deploy from git where a tagged versions requirements.txt might vary. But meh, guess I will just draft out an alternative


coderanger commented Feb 20, 2015

@asciifaceman Installing using a requirements.txt is fine, just use an execute resource for it.

Could you expand a bit on that? I was kind of relying on the readme a bit.
Also sorry if I came off wrong

Edit: Actually how would that work with virtualenvironments and not being in the venv at the time of execute


coderanger commented Jul 17, 2015

This is now handed in via python_package and the #options property.

@coderanger coderanger closed this Jul 17, 2015

jblaine commented Jul 17, 2015

Rad. Thanks Noah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment