Files
openstack-ansible/playbooks/roles/repo_build/templates/requirements_constraints.txt.j2
Kevin Carter cc7ff9855f Updated for a couple nits
This makes a few updates to clean up the new repo-build role.

Change-Id: Ie87ea568157ce83aa67bc2115d3bcdd23784d951
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-10-22 23:33:19 +00:00

20 lines
928 B
Django/Jinja

# Computed constraints
{% set constraint_pkgs = [] -%}
{% for clone_item in cloned_repos.stdout_lines -%}
git+file://{{ clone_item }}#egg={{ clone_item | git_link_parse_name | replace('-', '_') | lower }}
{% set _ = constraint_pkgs.append(clone_item | git_link_parse_name | replace('-', '_') | lower) %}
{% endfor %}
# upper boundry constraints from requirements repo.
{% for constraint_item in upper_constraints %}
{%- set constraint_split = constraint_item.split('===') %}
{%- set constraint_name = constraint_split[0] %}
{%- set constraint_name_normalized = constraint_name | replace('-', '_') | lower %}
{% if constraint_name_normalized not in constraint_pkgs %}
{% if repo_build_use_upper_constraints | bool %}
{{ constraint_split[0] | replace('-', '_') | lower }}<={{ constraint_split[1] }}
{% else %}
# {{ constraint_split[0] | replace('-', '_') | lower }}<={{ constraint_split[1] }}
{% endif %}
{% endif %}
{% endfor %}