diskimage-builder/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version
Dirk Mueller f58bf252de Drop support for Ubuntu precise
Ubuntu 12.04 LTS reached its regular End of Life on April 28, 2017.

Depends-On: I5e145095a10db112bb27516bfe652d2cdc052a61
Change-Id: I64af4c5183d77a75dcd062895d19b0a1330c8da8
2017-05-31 14:36:30 +02:00

34 lines
926 B
Plaintext

# Pick which distros we need to force python2
if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
if [ "$DISTRO_NAME" == "ubuntu" ]; then
if [ "$DIB_RELEASE" == "trusty" ]; then
DIB_PYTHON_VERSION=2
fi
elif [ "$DISTRO_NAME" == "debian" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "fedora" ]; then
if [ "$DIB_RELEASE" -le 22 ]; then
DIB_PYTHON_VERSION=2
fi
elif [ "$DISTRO_NAME" == "centos" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "centos7" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "rhel7" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "opensuse" ]; then
DIB_PYTHON_VERSION=2
fi
fi
if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
DIB_PYTHON_VERSION=3
fi
export DIB_PYTHON_VERSION
export DIB_PYTHON=python${DIB_PYTHON_VERSION}
# Local variables:
# mode: sh
# End: