Use correct pip executable for mixed distro/source installs

Ubuntu does not package tempest plugins so even for a distro
install the plugins are installed using pip. We must use the correct
pip executable when installing the plugins for py3 environments.

Change-Id: Ib399176ad12d556790daf770f11e7e8e14c3fd98
This commit is contained in:
Jonathan Rosser 2020-01-21 14:32:20 +00:00
parent 877554ae11
commit 817a58d16d
2 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ stestr_executable: "{{ _stestr_executable | default('stestr') }}"
# on choosing distro it will install based on distribution
tempest_install_method: "source"
tempest_venv_python_executable: "{{ openstack_venv_python_executable | default(_tempest_venv_python_executable) | default('python2') }}"
tempest_install_pip_executable: "{{ (tempest_venv_python_executable == 'python2') | ternary('pip', 'pip3') }}"
# Set the package install state for distribution and pip packages
# # Options are 'present' and 'latest'

View File

@ -49,6 +49,7 @@
name: "/opt/{{ item.name|replace('-', '_') }}_{{ item.branch|replace('/', '_') }}"
state: "{{ tempest_pip_package_state }}"
virtualenv: "{{ tempest_plugin_install_source | ternary(omit, tempest_venv_bin | dirname) }}"
executable: "{{ tempest_plugin_install_source | ternary(tempest_install_pip_executable, omit) }}"
virtualenv_site_packages: "{{ tempest_plugin_install_source | ternary(omit, 'no') }}"
extra_args: >-
{{ tempest_pip_install_args }}
@ -65,6 +66,7 @@
name: "{{ item.package }}"
state: "{{ tempest_pip_package_state }}"
virtualenv: "{{ tempest_plugin_install_source | ternary(omit, tempest_venv_bin | dirname) }}"
executable: "{{ tempest_plugin_install_source | ternary(tempest_install_pip_executable, omit) }}"
virtualenv_site_packages: "{{ tempest_plugin_install_source | ternary(omit, 'no') }}"
extra_args: >-
{{ tempest_pip_install_args }}