diff --git a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install index 5804c31..2f4a451 100755 --- a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install +++ b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install @@ -48,8 +48,11 @@ if [ $HAS_PIP == "False" ]; then $VENVDIR/bin/pip install "pip==$REQUIRED_PIP_STR" fi -# Upgrade setuptools package for openSuse -if [ "$DISTRO_NAME" == "opensuse" ]; then +# Upgrade setuptools package for openSuse and in virtualenvs using Python 2.x +# NOTE(rpittau): if we want to keep compatibility with Python 2.x, we need to +# upgrade setuptools in the virtualenv as the default installed has issues +# when parsing requirements. +if [ "$DISTRO_NAME" == "opensuse" ] || [ $IPA_PYTHON_VERSION == 2 ]; then $VENVDIR/bin/pip install -U setuptools fi