Make the use of the repo index overrides optional
Currently the repo build process hard codes the use of a set of indexes when building wheels. This overrides any existing pip configuration in the repo container and is somewhat unintuitive as a result. As the default index is pypi, which is the default for pip anyway, this is a redundant hard-code which really shouldn't be required. The specification of additional indexes should also be optional, as the default of using pypi again just results in a duplicated check by pip. Also, for context, OpenStack-CI gating will prefer the use of a system-wide pip.conf which will be copied from the host to the container. Without this patch, that simple solution to our gating process will not work. Change-Id: I25e4faecbffad6301509c62f55c34ba86b92a658
This commit is contained in:
parent
7348e023ac
commit
b769f0a03b
@ -49,9 +49,13 @@ repo_build_apt_packages:
|
||||
- python-dev
|
||||
- swig
|
||||
|
||||
repo_build_pip_default_index: "https://pypi.python.org/simple"
|
||||
repo_build_pip_extra_indexes:
|
||||
- "https://pypi.python.org/simple"
|
||||
# Optionally set this to change the default index from pypi to an alternative
|
||||
#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:
|
||||
# - "https://pypi.python.org/simple"
|
||||
|
||||
# TODO(odyssey4me): Deprecate this var for Mitaka & mark for removal
|
||||
# in Newton.
|
||||
# repo_build_pip_extra_index: "https://pypi.python.org/simple"
|
||||
|
@ -20,12 +20,12 @@
|
||||
--find-links {{ repo_build_global_links_path }} \
|
||||
--find-links {{ repo_build_output }} \
|
||||
--constraint {{ repo_build_release_path }}/{{ repo_build_release_tag }}/requirements_constraints.txt \
|
||||
--index-url {{ repo_build_pip_default_index }} \
|
||||
--trusted-host {{ repo_build_pip_default_index | netloc_no_port }} \
|
||||
{% 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_index is defined %}--extra-index-url {{ repo_build_pip_extra_index }} \
|
||||
--trusted-host {{ repo_build_pip_extra_index | netloc_no_port }} \{% endif %}
|
||||
--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 ') }} \
|
||||
{% 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 ') }} \{% endif %}
|
||||
--build {{ repo_build_dir }} \
|
||||
--log /var/log/repo/repo_builder.log \
|
||||
--requirement {{ repo_build_release_path }}/{{ repo_build_release_tag }}/requirements_global_requirements.txt
|
||||
@ -40,12 +40,12 @@
|
||||
--find-links {{ repo_build_global_links_path }} \
|
||||
--find-links {{ repo_build_output }} \
|
||||
--constraint {{ repo_build_release_path }}/{{ repo_build_release_tag }}/requirements_constraints.txt \
|
||||
--index-url {{ repo_build_pip_default_index }} \
|
||||
--trusted-host {{ repo_build_pip_default_index | netloc_no_port }} \
|
||||
{% 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_index is defined %}--extra-index-url {{ repo_build_pip_extra_index }} \
|
||||
--trusted-host {{ repo_build_pip_extra_index | netloc_no_port }} \{% endif %}
|
||||
--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 ') }} \
|
||||
{% 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 ') }} \{% endif %}
|
||||
--build {{ repo_build_dir }} \
|
||||
--log /var/log/repo/repo_builder.log \
|
||||
--requirement {{ repo_build_release_path }}/{{ repo_build_release_tag }}/requirements_local_filtered.txt
|
||||
|
@ -58,3 +58,4 @@ unset PKG_DIRECTORY
|
||||
unset PKG_LOWER
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user