2014-06-27 14 views

Odpowiedz

6

Jednym ze sposobów jest wywołanie Pythona z katalogu bin virtualenv.

- name: egg 
    shell: "/path/to/env/bin/python setup.py develop" 
1

Można również spróbować połączyć łańcuchy poleceń razem.

- name: chained shell command 
    shell: "source /path/to/env/bin/activate; python setup.py develop" 
3

po prostu użyć podejście pip -e, poprzez pip command (który gwarantuje, że virtualenv istnieje), dodając parametr -e z extra_args. Np .:

- name: install MYPACKAGE in VIRTUALENV  
    pip: name='PATH OF YOUR PACKAGE' 
     extra_args='-e' # this creates a link rather then copying the files 
     virtualenv='PATH OF YOUR VIRTUALENV' # will be created if does not exist 

Opcjonalnie możesz chcieć określić sposób wykonywania skryptu virtualenv, np. jeśli potrzebujesz python3 dodaj:

 virtualenv_command='python3 /PATH_TO_VE/virtualenv.py' 
Powiązane problemy