openstack-zuul-jobs/roles/build-wheel-cache/tasks/main.yaml
Ian Wienand d1fd2e556c build-wheel-cache: Don't use virtualenv on python3 platforms
As noted inline, platforms are starting to decide to deprecate
virtualenv for "python3 -m venv".  Put in logic to use venv in our
Python 3 paths.

Change-Id: I46778642647d7be995d476fb567a9943cae66b8f
2022-02-16 11:14:26 +11:00

31 lines
749 B
YAML

- name: Ensure virtualenv dependency
include_role:
name: ensure-virtualenv
when: wheel_python == "python2"
# NOTE(ianw) : 2022-02-08 - on python3 we use -m venv; ensure-pip will
# set this up for us. Remove above and the conditional here when we
# drop python2 platforms.
- name: Ensure pip
include_role:
name: ensure-pip
when: wheel_python == "python3"
- name: Ensure wheel dir exists
file:
group: zuul
owner: zuul
path: "{{ wheel_dir }}"
state: directory
become: yes
- name: Prevent using existing wheel mirror
become: yes
lineinfile:
path: /etc/pip.conf
state: absent
regexp: '^extra-index-url.*$'
- name: Build the wheel mirror
script: wheel-build.sh {{ wheel_dir }} {{ wheel_python }}