Replace virtualenv-tools by a script
virtualenv-tools has a bug which gets triggered in gates: it can't change the shebang of a virtualenv python bin/ files if they were generated with a virtualenv script whose shebang ends with python2 instead of python. Because we can't modify virtualenv-tools, we use shell scripts instead. Change-Id: I7c4f7acf052989bd0947b0c54e2f539639cf834c Partial-Bug: #1741634
This commit is contained in:
parent
d484d3097e
commit
7b96ecf17b
|
@ -110,7 +110,6 @@ magnum_requires_pip_packages:
|
|||
- pyyaml
|
||||
- shade
|
||||
- virtualenv
|
||||
- virtualenv-tools
|
||||
|
||||
magnum_pip_packages:
|
||||
- MySQL-python
|
||||
|
|
|
@ -109,9 +109,13 @@
|
|||
- magnum_get_venv | changed
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
virtualenv-tools --update-path=auto --reinitialize {{ magnum_bin | dirname }}
|
||||
shell: |
|
||||
find {{ magnum_bin }} -name \*.pyc -delete
|
||||
sed -si '1s/^.*python.*$/#!{{ magnum_bin | replace ('/','\/') }}\/python/' {{ magnum_bin }}/*
|
||||
virtualenv {{ magnum_bin | dirname }}
|
||||
when: magnum_get_venv | changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Record the venv tag deployed
|
||||
ini_file:
|
||||
|
|
Loading…
Reference in New Issue