From 8df6eb01184672ffdc752437ea4d98d13f16026e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 8 Mar 2019 13:19:03 +0100 Subject: replace 'distro_python3' variable with 'distro_python_version' RHEL7 derived distros use Python 2.7 RHEL8 uses Python 3.6 Ubuntu 18.04 uses Python 3.6, but we haven't enabled it yet. Debian:buster uses Python 3.7, but we haven't enabled it yet. We have several places in code where "/lib/pythonX.Y/site-packages" is used so we need to know value of X.Y rather than py2/py3 switch. How to check for Python 2: {% if distro_python_version == '2.7' %} Breaks: Iad6b70b433a0dd1b0f8ae6790fd280594517661a Change-Id: Ie24f109af19ae0438c21e0d43cb3cc947812b4ce --- docker/base/Dockerfile.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docker/base') diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index bd75f6a90..98e8ff132 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -17,7 +17,8 @@ LABEL kolla_version="{{ kolla_version }}" ENV KOLLA_BASE_DISTRO={{ base_distro }} \ KOLLA_INSTALL_TYPE={{ install_type }} \ - KOLLA_INSTALL_METATYPE={{ install_metatype }} + KOLLA_INSTALL_METATYPE={{ install_metatype }} \ + KOLLA_DISTRO_PYTHON_VERSION={{ distro_python_version }} #### Customize PS1 to be used with bash shell COPY kolla_bashrc /tmp/ -- cgit v1.2.3