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
Installing distribute should not be hard coded to run as root. #99
Conversation
Do run() instead of run_as_root() so user can decide context using a with statement such as: with fabtools.python.virtualenv('/home/example/python'): fabtools.require.python.distribute()
Thanks for the pull request, Jeff. fabtools needs to install distribute globally (as root) in order to install pip. (The Also, I think it's not necessary to install distribute into a virtualenv, as it is already installed as part of the virtualenv creation anyway:
What do you think? |
I have a case where even if it distribute globally when I do the virtual environment it says --version is not defined. This is why I wanted to run it as non root. |
Can you share a small fabfile that reproduces this problem? |
I am not sure why easy_install --version is not defined. This is why detecting if distribute is installed or not fails. |
I can reproduce this too. Something is wrong. Investigating... |
This is my first time using fab/fabtools so maybe I am doing something wrong? |
Older versions of distribute don't have the |
Linux apricot 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux root@apricot:~# lsb_release -a |
Thanks! Can you paste a small example of what you're trying to do with virtualenv, and the output showing the problem? |
Random question but is there is ssh authorized_keys module that lets you add ssh keys and known hosts easily? (I am trying to find in github how to message you directly but I can't seem to. Did they remove that feature?!) |
Support for authorized keys coming later today :) I'll consider adding known hosts too. |
Here is my fabfile: https://gist.github.com/tachang/5430196 Any pointers would be awesome by the way. Just getting started. What I am trying to do is log in as root and install all the packages that are needed. But if root isn't needed then the user the application runs under shouldn't have it. In this case why run the distribute installation as root (incase the version on the box is different) when you don't have to? |
Wow that's awesome. Fabtools has a good chance to be the defacto standard library for fabric! :) |
I'm not going to merge this, so I'll close the pull request, but please open an issue if you still have problems. I'll do my bet to help you use fabtools and will consider improvements that would make it better suited to you use case. |
Do run() instead of run_as_root() so user can decide context using
a with statement such as:
with fabtools.python.virtualenv('/home/example/python'):
fabtools.require.python.distribute()