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: I964b9be6da90018f67b6a3bc1716245f52ffc9f9 Partial-Bug: #1741634
This commit is contained in:
parent
61685668a8
commit
d6b107dc6e
|
@ -64,7 +64,6 @@ molteniron_requires_pip_packages:
|
|||
- sqlalchemy
|
||||
- sqlalchemy_utils
|
||||
- virtualenv
|
||||
- virtualenv-tools
|
||||
|
||||
# Common pip packages
|
||||
molteniron_pip_packages:
|
||||
|
|
|
@ -104,11 +104,14 @@
|
|||
when: molteniron_developer_mode | bool
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
virtualenv-tools --update-path=auto --reinitialize {{ molteniron_bin | dirname }}
|
||||
shell: |
|
||||
find {{ molteniron_bin }} -name \*.pyc -delete
|
||||
sed -si '1s/^.*python.*$/#!{{ molteniron_bin | replace ('/','\/') }}\/python/' {{ molteniron_bin }}/*
|
||||
when:
|
||||
- not molteniron_developer_mode | bool
|
||||
- molteniron_get_venv | changed or molteniron_venv_dir | changed
|
||||
- molteniron_get_venv | changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Record the venv tag deployed
|
||||
ini_file:
|
||||
|
|
Loading…
Reference in New Issue