ironic-python-agent-builder/dib/ironic-python-agent-ramdisk/environment.d/20-ipa-distro-family.bash
Riccardo Pittau 044ae3f2d6 Force DIB_PYTHON_VERSION to 3 for Debian
Since more and more python libraries are removing support for
Python 2 in the latest versions, we need to force the version of
Python used to build the DIB Debian image to 3, at least until
DIB fully converts to Python 3.

Change-Id: I8e6f15635754ab917562d758c35a8c5f4629efdf
2020-02-20 10:25:49 +01:00

13 lines
342 B
Bash

# TODO(dtantsur): verify if opensuse can be added here
if [[ $DISTRO_NAME =~ (fedora|centos|centos7|rhel|rhel7) ]]; then
export IPA_DISTRO_FAMILY=rh
else
export IPA_DISTRO_FAMILY=other
fi
# NOTE(rpittau) force Python version to 3 for debian
if [[ $DISTRO_NAME =~ debian ]]; then
DIB_PYTHON_VERSION=3
export DIB_PYTHON_VERSION
fi