---
- name: Create virtualenv for Python {{ python_version }}
  ansible.builtin.include_tasks:
    file: virtualenv.yml

- name: Create wheel build script from template
  ansible.builtin.template:
    src: "build_tf_text_wheels.sh.j2"
    dest: "{{ build_dir }}/scripts/build_tf_text_wheels.sh"
    mode: "755"
    force: true

- name: Build TensorFlow Text wheels for Python {{ python_version }}  # noqa no-changed-when
  community.docker.docker_container_exec:
    container: "tf-text-multipython"
    command: /bin/bash -c /tmp/workspace/scripts/build_tf_text_wheels.sh
    chdir: "/tmp/workspace"
