From ac72d9ab8e1a901ba1ffb3c2eb24f9d6c3bce11d Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Fri, 26 May 2017 11:55:16 +0100 Subject: [PATCH] Allow the developer constraints to be adjusted In order to do a developer mode that allows installation of packages from local file, which take precedence over the developer_mode constraints, we need to allow the order of the constraints to be changed. This patch adds a "pip_install_developer_constraints" var which is used to set the developer mode constraints. By default this will leave the same behaviour but will allow additional constraints to be added, or the developermode constraints file to be overriden altogether. Change-Id: I15ba730bb531289a5454ec932a1d27db64c4c5c8 --- tasks/sahara_install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/sahara_install.yml b/tasks/sahara_install.yml index b18a479..9bdc5e5 100644 --- a/tasks/sahara_install.yml +++ b/tasks/sahara_install.yml @@ -38,6 +38,7 @@ name: "{{ sahara_requires_pip_packages }}" state: "{{ sahara_pip_package_state }}" extra_args: >- + {{ sahara_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages @@ -90,7 +91,7 @@ virtualenv: "{{ sahara_bin | dirname }}" virtualenv_site_packages: "no" extra_args: >- - {{ sahara_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }} + {{ sahara_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages