Use the native python module to create virtual environments
Do this instead of using the 'virtualenv' command Change-Id: I9fa8c3379d7f01486abdfb8c8264575328d2661e
This commit is contained in:
parent
10d2e0dbcb
commit
4ec289281b
|
@ -53,15 +53,10 @@
|
|||
path: "{{ venv_install_destination_path | dirname }}"
|
||||
state: directory
|
||||
|
||||
# NOTE(odyssey4me):
|
||||
# Not using --always-copy for CentOS due to
|
||||
# https://github.com/pypa/virtualenv/issues/565
|
||||
- name: Create the virtualenv (if it does not exist)
|
||||
command: >-
|
||||
virtualenv
|
||||
--no-download
|
||||
--python={{ venv_python_executable }}
|
||||
{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('--always-copy', '') }}
|
||||
{{ venv_python_executable }}
|
||||
-m venv
|
||||
{{ venv_install_destination_path }}
|
||||
args:
|
||||
creates: "{{ venv_install_destination_path }}/bin/activate"
|
||||
|
|
|
@ -57,15 +57,10 @@
|
|||
owner: "{{ venv_build_host_user_name | default(omit) }}"
|
||||
group: "{{ venv_build_host_group_name | default(omit) }}"
|
||||
|
||||
# NOTE(odyssey4me):
|
||||
# Not using --always-copy for CentOS due to
|
||||
# https://github.com/pypa/virtualenv/issues/565
|
||||
- name: Create the wheel build virtualenv (if it does not exist)
|
||||
command: >-
|
||||
virtualenv
|
||||
--no-download
|
||||
--python={{ venv_python_executable }}
|
||||
{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('--always-copy', '') }}
|
||||
{{ venv_python_executable }}
|
||||
-m venv
|
||||
{{ venv_build_host_venv_path }}
|
||||
args:
|
||||
creates: "{{ venv_build_host_venv_path }}/bin/activate"
|
||||
|
|
|
@ -19,6 +19,7 @@ _venv_build_base_distro_package_list:
|
|||
- g++
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('pkg-config', 'python3-pkgconfig') }}"
|
||||
- "{{ (venv_python_executable == 'python2') | ternary('python-dev', 'python3-dev') }}"
|
||||
- python3-venv
|
||||
redhat:
|
||||
- autoconf
|
||||
- cmake
|
||||
|
|
Loading…
Reference in New Issue