-
Notifications
You must be signed in to change notification settings - Fork 604
[COOK-1169] python::pip recipe failure because it's looking for Python in the wrong directory #2
Conversation
…ation of pip can complete when install_method is "package."
Hey @captnswing, noticed your last patch via git blame. I'm not a heavy Python user – does this pull request make sense to you? |
[COOK-1169] python::pip recipe failure because it's looking for Python in the wrong directory
It's failing currently for me on debian squeeze and fedora 16. Distributed install puts pip into /usr/bin, not to /usr/local/bin, therefore not_if in pip install never works. |
@asergeyev Are you able to get it to work by overriding |
yes, but IMO it should be tested on platforms and set to correct default one. I wonder if pip installer has clues where it puts stuff to be used in attributes/default.rb Freebsd with python installed in /usr/local/bin put pip into /usr/local/bin for me. Maybe it's still match to python_prefix... why did you changed it originally? |
["freebsd"] => { needs to be smarter than if python['install_method'] == 'package' |
@asergeyev I changed it because it wasn't working on Ubuntu and there was no way to differentiate between Python's path and pip's. This solution isn't super intelligent – it pushes the decision out to the cookbook user. I don't necessarily disagree with your opinion that the cookbook should be smarter though. |
Interesting... ubuntu has easy_install in /usr/bin and when you install pip it ends up in usr/local log.info("Installing %s script to %s", script_name, self.script_dir) Now here: gives on fedora: on debian squeeze: on some ubuntu on few versions of freebsd let me suggest a patch here... |
Looks like you already answered your previous question, but for completeness:
I actually don't think I ever checked for |
https://github.com/asergeyev/python-cookbook/compare/mytakeonit |
It's not my call, since I don't work for Opscode or manage their repositories. I think maybe the best approach is to suggest this on JIRA since they probably monitor that more than pull request discussions: http://tickets.opscode.com/browse/COOK-1169 |
If you'd like you may re-open that ticket and let them know. I'd give them a poke via pull request but their lawyers have put so many rules around "contributing to Opscode cookbooks" discouraging me from doing it. |
Use upstream latest
Separated Python and pip's
prefix_dir
so that the installation of pip can complete wheninstall_method
ispackage
.