Create distutils cfg before install and build

Some old Python2 pip sources still use setup.py, so when you provide
your own index sources via repo_build_pip_default_index the 'Download
requirement pip sources' task might fail while trying to reach a
default external PyPI index URL.

Change-Id: Ib7d2a9aee9b13f38b73136f22f0b51e766c8dd10
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
Maksim Malchuk 2018-06-05 16:53:53 +03:00
parent 61c507104b
commit 5ceedbbb5f
1 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,14 @@
- "{{ repo_build_dir }}"
- "{{ repo_build_output }}"
- name: Create distutils configuration file with index mirror
ini_file:
dest: "~/.pydistutils.cfg"
section: easy_install
option: index_url
value: "{{ repo_build_pip_default_index }}"
when: repo_build_pip_default_index is defined
- name: Download requirement pip sources
shell: >-
set -o pipefail;