From 8eed2492eefa26d09bde7c21b58f540aeea5823b Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 20 Apr 2018 14:20:10 +0100 Subject: [PATCH] Override the pip index used for the wheel build When doing the wheel build we need to ensure that we make use of the pypi mirror directly. When upgrading, if we leave it to the pip.conf file contents, it will only use the contents of the pypiserver which locks it down to the wheels built for the version we're upgrading from. The wheel build therefore fails. Leaving the pip.conf config in place is still good for ensuring that anything installed on the repo server later uses the pypiserver contents. Change-Id: I5d1f33832c9738683b49384ea5ebfb571b526a81 (cherry picked from commit a25d1b41db49377c09b5e2c07ce3a38dd6e9df1c) --- defaults/main.yml | 2 +- tasks/repo_build_wheels.yml | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index c642bb6..74875da 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -74,7 +74,7 @@ repo_build_venv_rebuild: no repo_build_venv_timeout: 30 # Optionally set this to change the default index from pypi to an alternative -#repo_build_pip_default_index: "https://pypi.python.org/simple" +repo_build_pip_default_index: "https://pypi.python.org/simple" # Optionally set this to a list of extra indexes to be used when building wheels #repo_build_pip_extra_indexes: diff --git a/tasks/repo_build_wheels.yml b/tasks/repo_build_wheels.yml index f78a97e..bb2d826 100644 --- a/tasks/repo_build_wheels.yml +++ b/tasks/repo_build_wheels.yml @@ -36,10 +36,8 @@ --download {{ repo_build_output }} --no-binary :all: --constraint {{ repo_build_release_path }}/requirements_constraints.txt - {% if repo_build_pip_default_index is defined %} --index-url {{ repo_build_pip_default_index }} --trusted-host {{ repo_build_pip_default_index | netloc_no_port }} - {% endif %} {% if repo_build_pip_extra_indexes is defined %} --extra-index-url {{ repo_build_pip_extra_indexes | join(' --extra-index-url ') }} --trusted-host {{ repo_build_pip_extra_indexes | map('netloc_no_port') | join(' --trusted-host ') }} @@ -61,10 +59,8 @@ {% if repo_build_pip_no_binary is defined %} --no-binary {{ repo_build_pip_no_binary | join(' --no-binary ') }} {% endif %} - {% if repo_build_pip_default_index is defined %} --index-url {{ repo_build_pip_default_index }} --trusted-host {{ repo_build_pip_default_index | netloc_no_port }} - {% endif %} {% if repo_build_pip_extra_indexes is defined %} --extra-index-url {{ repo_build_pip_extra_indexes | join(' --extra-index-url ') }} --trusted-host {{ repo_build_pip_extra_indexes | map('netloc_no_port') | join(' --trusted-host ') }}