-
Notifications
You must be signed in to change notification settings - Fork 604
[COOK-2702] Fix python::pip fails on changing node.python.prefix_dir #35
[COOK-2702] Fix python::pip fails on changing node.python.prefix_dir #35
Conversation
I just ran into this same issue. This is exactly how I fixed the problem as well. |
[COOK-2702] Fix python::pip fails on changing node.python.prefix_dir
@jtimberman @tk0miya this cookbook is totally broken now on Ubuntu. Was this converged with Test Kitchen? It fails for me: |
@@ -23,7 +23,7 @@ | |||
elsif platform_family?("smartos") | |||
pip_binary = "/opt/local/bin/pip" | |||
else | |||
pip_binary = "/usr/local/bin/pip" | |||
pip_binary = "#{node['python']['prefix_dir']}/bin/pip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtimberman @tk0miya So on Ubuntu python is at /usr/bin/python
and pip installs into /usr/local/bin/pip
so this change causes this recipe to stop being idempotent.
Sorry, I fixed problem of ubuntu. please merge it again. |
@tk0miya so I'm wondering if we should rethink this. The huge set of if/else statements for each platform feels like a smell. |
Not just multiple if/else statements but if/else statements that affect the same value split across two different files. Agree that we need to fix before the release, but lets aim to clean up this logic rather than just add to it. |
I concur with @schisamo and @stevendanna. We actually already had the following ticket, which was to fix Debian awhile back, but it seems the best solution for that ticket is adding new attributes for pip and virtualenv. As such, I will close this ticket in favor of that one. |
I understand. i'm waiting for that :-) |
This is a fix for COOK-2702