Merge "Ensure __pycache__ folder is deleted"

This commit is contained in:
Zuul 2018-07-14 10:58:27 +00:00 committed by Gerrit Code Review
commit d37be91050
1 changed files with 2 additions and 0 deletions

View File

@ -93,7 +93,9 @@
# to https://github.com/pypa/virtualenv/issues/565
- name: Update virtualenv path
shell: |
set -o errexit
find {{ heat_bin }} -name \*.pyc -delete
if test -d {{ heat_bin }}/__pycache__; then rmdir {{ heat_bin }}/__pycache__; fi
sed -si '1s/^.*python.*$/#!{{ heat_bin | replace ('/','\/') }}\/python/' {{ heat_bin }}/*
virtualenv {{ heat_bin | dirname }} \
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }} \