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: I75f189b7e8856f6ec4e844ca8fdf2c8c81fb3faa
Partial-Bug: #1741634
This commit is contained in:
Jean-Philippe Evrard 2018-01-08 12:31:00 +00:00
parent 91b7524603
commit 851f1063f5
2 changed files with 5 additions and 3 deletions

View File

@ -425,7 +425,6 @@ keystone_ceilometer_enabled: false
# Keystone packages that must be installed before anything else
keystone_requires_pip_packages:
- virtualenv
- virtualenv-tools
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
# Common pip packages

View File

@ -171,9 +171,12 @@
- keystone_get_venv | changed
- name: Update virtualenv path
command: >
virtualenv-tools --update-path=auto --reinitialize {{ keystone_bin | dirname }}
shell: |
find {{ keystone_bin }} -name \*.pyc -delete
sed -si '1s/^.*python.*$/#!{{ keystone_bin | replace ('/','\/') }}\/python/' {{ keystone_bin }}/*
when: keystone_get_venv | changed
tags:
- skip_ansible_lint
- name: Create WSGI symlinks
file: