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
|
- pyyaml
|
||||||
- shade
|
- shade
|
||||||
- virtualenv
|
- virtualenv
|
||||||
- virtualenv-tools
|
|
||||||
|
|
||||||
magnum_pip_packages:
|
magnum_pip_packages:
|
||||||
- MySQL-python
|
- MySQL-python
|
||||||
|
|
|
@ -109,9 +109,13 @@
|
||||||
- magnum_get_venv | changed
|
- magnum_get_venv | changed
|
||||||
|
|
||||||
- name: Update virtualenv path
|
- name: Update virtualenv path
|
||||||
command: >
|
shell: |
|
||||||
virtualenv-tools --update-path=auto --reinitialize {{ magnum_bin | dirname }}
|
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
|
when: magnum_get_venv | changed
|
||||||
|
tags:
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: Record the venv tag deployed
|
- name: Record the venv tag deployed
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
Loading…
Reference in New Issue