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: Ibd281ceb0696c233a2f17bab162ae3158cf76a95
This commit is contained in:
Andy McCrae 2017-05-26 11:43:19 +01:00
parent 4dfa9a89e9
commit f487af10c2
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@
name: "{{ molteniron_requires_pip_packages | join(' ') }}"
state: "{{ molteniron_package_state }}"
extra_args: >-
{{ molteniron_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
@ -93,7 +94,7 @@
virtualenv: "{{ molteniron_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: >-
{{ molteniron_developer_mode | ternary('--constraint /opt/developer-pip-constraints.txt', '') }}
{{ molteniron_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