
CentOS 7 reached EOL on 30th June 2024[1] and RHEL 7 ended its maintenance support 2 phase[2] the same date. This change removes the ablity to build images derived from these base images. The centos and centos-minimal elements now default to a DIB_RELEASE value of 9-stream. [1] https://www.redhat.com/en/topics/linux/centos-linux-eol [2] https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux/rhel-7-end-of-maintenance Change-Id: Ic50e08d9f84bbd319129be236d799eade5f40be8
33 lines
1.4 KiB
Bash
33 lines
1.4 KiB
Bash
# Due to the many historical problems mixing python2/3 versions and
|
|
# upgrading packaged system pip/setuptools/virtualenv binaries with
|
|
# upstream non-packaged versions, we wish to avoid this completely on
|
|
# modern distros.
|
|
if [[ $DISTRO_NAME =~ (centos|rhel) ]]; then
|
|
export DIB_INSTALLTYPE_pip_and_virtualenv=${DIB_INSTALLTYPE_pip_and_virtualenv:-package}
|
|
|
|
if [[ ${DIB_INSTALLTYPE_pip_and_virtualenv} == "source" ]]; then
|
|
echo "*** pip-and-virtualenv does not support 'source' install for $DISTRO_NAME/$DIB_RELEASE"
|
|
exit 1
|
|
fi
|
|
fi
|
|
# The default variables setup below are only useful during the phases
|
|
# that dib-python exists
|
|
if [[ ! -e /usr/local/bin/dib-python ]]; then
|
|
return 0
|
|
fi
|
|
|
|
# NOTE(ianw): you don't want to call "dib-python -m pip" because that
|
|
# can leave behind interpreters #!/usr/local/bin/dib-python in
|
|
# scripts. De-reference the link
|
|
_dib_python_path=$(readlink /usr/local/bin/dib-python)
|
|
export DIB_PYTHON_PIP="$_dib_python_path -m pip"
|
|
# We make an opinionated, but simplifying decision here that on
|
|
# Python3 platforms, just use venv. There are some corner cases that
|
|
# the external "virtualenv" package still handles better, but for most
|
|
# purposes "venv" should be fine.
|
|
if [[ $DIB_PYTHON_VERSION == 3 ]]; then
|
|
export DIB_PYTHON_VIRTUALENV="$_dib_python_path -m venv"
|
|
else
|
|
export DIB_PYTHON_VIRTUALENV="$_dib_python_path -m virtualenv"
|
|
fi
|