kolla-ansible/docker/macros.j2
Jeffrey Zhang 195bcd0f43 Fix pycparser wheel package issue
pycparser-2.14-py2.py3-none-any.whl is broken or something
misconfigured, while pycparser-2.14.tar.gz is ok.  Revert this PS when
the bug is fixed[0]

[0] https://github.com/eliben/pycparser/issues/147

TrivialFix

Change-Id: If719a5fdfbcedfe4770354b18dc47cc94e90dc3d
2016-10-03 14:43:55 +08:00

24 lines
1001 B
Django/Jinja

{% macro install_packages(packages) -%}
{% if packages is defined and packages|length > 0 -%}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%}
RUN yum -y install {{ packages | join(' ') }} && yum clean all
{%- elif base_distro in ['ubuntu', 'debian'] -%}
{#-
debian_package_install is a utility method to build up an appropriate
set of commands to install packages in a debian-based environment that
may include URL links to a .deb package (e.g, heka)
-#}
RUN {{ debian_package_install(packages) }}
{%- endif %}
{%- endif %}
{%- endmacro %}
{% macro install_pip(packages) %}
{#-
TODO(Jeffrey4l): remove `--no-binary pycparser` when the bug[0] is fixed.
[0] https://github.com/eliben/pycparser/issues/147
-#}
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade --no-binary pycparser -c requirements/upper-constraints.txt {% for package in packages %}{{ package }} {% endfor %}
{% endmacro %}