Hi,

I think I expressed myself wrong. What I want is to have the effect
spawn outside of python. So I can provide a fab command that will
enhance the activate script from virtualenv.

For example:

$ fab activate
$ pip install some_package

and some_package will end up inside the venv as it was activated by
the fabric script.

My goal here will be to replace an equivalent activate.sh that
modifies the state of the current session (in the shell) not in
python.

On Sun, Nov 27, 2011 at 4:46 PM, Jeff Forcier <[email protected]> wrote:
> Hi Jorge,
>
> On Thu, Nov 24, 2011 at 2:34 PM, Jorge Vargas <[email protected]> wrote:
>> Hi,
>>
>> I was wondering if this is possible. I want something like this.
>>
>> def activate():
>>    local('source env/bin/activate')
>
> You'll need to use prefix() for this, it's in the context managers API docs:
>
>    
> http://docs.fabfile.org/en/1.3.3/api/core/context_managers.html#fabric.context_managers.prefix
>
> As for why, see this FAQ:
>
>    
> http://docs.fabfile.org/en/1.3.3/faq.html#my-cd-workon-export-etc-calls-don-t-seem-to-work
>
> Best,
> Jeff
>
> --
> Jeff Forcier
> Unix sysadmin; Python/Ruby engineer
> http://bitprophet.org
>

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to