From c06679ccc3568134fb7c0ab5068c26ecc1834d23 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 18 Jul 2016 11:56:25 +0100 Subject: [PATCH] Add --no-binary option to wheel compile task There are situations where you may wish to ensure that a package is always built from source, regardless of whether a pre-compiled wheel is available on one of the indexes. This patch adds the ability to set a list of packages which must always be compiled from source. Change-Id: I2f47d94c58503514a3f9a0a62081cbc1ca53613b --- defaults/main.yml | 6 ++++++ tasks/repo_build.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index fcb2fdf..b073122 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -33,6 +33,12 @@ repo_build_release_tag: "untagged" #repo_build_pip_extra_indexes: # - "https://pypi.python.org/simple" +# Optionally set this to a list of packages which must always have the wheel +# compiled from source. This will ensure that a pre-compiled wheel is not +# downloaded from any of the indexes. +#repo_build_pip_no_binary: +# - libvirt-python + # TODO(odyssey4me): Deprecate this var for Mitaka & mark for removal # in Newton. # repo_build_pip_extra_index: "https://pypi.python.org/simple" diff --git a/tasks/repo_build.yml b/tasks/repo_build.yml index 024a4b0..7c78869 100644 --- a/tasks/repo_build.yml +++ b/tasks/repo_build.yml @@ -35,6 +35,7 @@ --find-links {{ repo_build_global_links_path }} --find-links {{ repo_build_output }} --constraint {{ repo_build_release_path }}/{{ repo_build_release_tag }}/requirements_constraints.txt + {% if repo_build_pip_no_binary is defined %}--no-binary {{ repo_build_pip_no_binary | join(',') }}{% 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_index is defined %}--extra-index-url {{ repo_build_pip_extra_index }}