fix(python): install python3 packages if requested

This commit is contained in:
N 2019-06-30 15:43:44 +01:00
parent e79d2c4d4a
commit 6f5a696ad1
No known key found for this signature in database
GPG key ID: 55A292EAB4E54067

View file

@ -2698,6 +2698,12 @@ install_ubuntu_deps() {
__PACKAGES="upstart"
fi
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
PY_PKG_VER=3
else
PY_PKG_VER=""
fi
if [ "$DISTRO_MAJOR_VERSION" -ge 16 ] && [ -z "$_PY_EXE" ]; then
__PACKAGES="${__PACKAGES} python2.7"
fi
@ -2706,13 +2712,13 @@ install_ubuntu_deps() {
__PACKAGES="${__PACKAGES} python-virtualenv"
fi
# Need python-apt for managing packages via Salt
__PACKAGES="${__PACKAGES} python-apt"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apt"
# requests is still used by many salt modules
__PACKAGES="${__PACKAGES} python-requests"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-requests"
# YAML module is used for generating custom master/minion configs
__PACKAGES="${__PACKAGES} python-yaml"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-yaml"
# Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813
__PACKAGES="${__PACKAGES} procps pciutils"