From 5ceedbbb5fc8dddf0437c846a5395484b6de81a8 Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Tue, 5 Jun 2018 16:53:53 +0300 Subject: [PATCH] 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 --- tasks/repo_build_wheels.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/repo_build_wheels.yml b/tasks/repo_build_wheels.yml index 0645f5d..ad01c57 100644 --- a/tasks/repo_build_wheels.yml +++ b/tasks/repo_build_wheels.yml @@ -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;