Use the real python executable path when running within a virtualenv

This commit is contained in:
Pedro Algarvio 2019-04-16 12:20:23 +01:00
parent 3d407e8a2e
commit f86a44e1fc
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
7 changed files with 20 additions and 8 deletions

View file

@ -38,6 +38,8 @@
{{ venv_dir }}:
virtualenv.managed:
- system_site_packages: False
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
uwsgi:
pip.installed:

View file

@ -2,6 +2,8 @@
virtualenv.managed:
- requirements: salt://issue-1959-virtualenv-runas/requirements.txt
- user: issue-1959
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
{%- if grains.get('pythonversion')[0] != 2 %}
{#- wheels are disabled because the pip cache dir will not be owned by the above issue-1959 user. Need to check this ASAP #}
- no_binary: ':all:'

View file

@ -2,10 +2,12 @@
virtualenv.managed:
- system_site_packages: False
- distribute: True
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
pep8-pip:
pip.installed:
- name: pep8
- bin_env: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-2028-pip-installed') }}
- require:
- virtualenv: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-2028-pip-installed') }}
pip.installed:
- name: pep8
- bin_env: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-2028-pip-installed') }}
- require:
- virtualenv: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('issue-2028-pip-installed') }}

View file

@ -5,6 +5,8 @@
virtualenv.managed:
- system_site_packages: False
- distribute: True
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
install_older_venv_1:
pip.installed:

View file

@ -2,6 +2,8 @@
virtualenv.managed:
- system_site_packages: False
- distribute: True
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
pep8:
pip.installed:

View file

@ -1,4 +1,4 @@
pep8-pip:
pip.installed:
- name: pep8
- bin_env: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('pip-installed-errors') }}
pip.installed:
- name: pep8
- bin_env: {{ salt['runtests_helpers.get_salt_temp_dir_for_path']('pip-installed-errors') }}

View file

@ -5,6 +5,8 @@
virtualenv.managed:
- system_site_packages: False
- distribute: True
{#- Provide the real path for the python executable in case tests are running inside a virtualenv #}
- python: {{ salt.runtests_helpers.get_python_executable() }}
install_older_venv:
pip.installed: