Ensure that pip.conf templates variables properly

When a user provides values other than the defaults for
upgrade/pre, they may not format it in a way that pip
interprets properly. To ensure that we template the
conf file correctly, we ensure that it's interpreted
as a boolean, then make it lower case as is expected by
pip.

Change-Id: I91590665cd2d878b6b5ef92d1118610bb4a3fd84
(cherry picked from commit b9d90b5e81)
This commit is contained in:
Jesse Pretorius 2018-04-20 13:03:56 +01:00
parent 0310b42169
commit a4d9055d81
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
[global]
disable-pip-version-check = {{ (pip_disable_version_check | bool) | lower }}
pre = {{ pip_enable_pre_releases }}
pre = {{ (pip_enable_pre_releases | bool) | lower }}
timeout = {{ pip_timeout }}
{% if pip_lock_to_internal_repo and pip_links | length > 0 %}
no-index = true
@ -13,7 +13,7 @@ trusted-host =
{% endif %}
[install]
upgrade = {{ pip_upgrade }}
upgrade = {{ (pip_upgrade | bool) | lower }}
{% if pip_lock_to_internal_repo and pip_links | length > 0 %}
find-links =
{% for pip_link in pip_links %}