Skip to content

Commit 78cf6f6

Browse files
committed
Always install python3 and its dev package
Some distros do not install python3/python3-devel with the minimal install. F29 doesn't install -devel, and neither Centos 7 or 8 install either. This patch ensures that these packages get installed. Ideally, PYTHON3_VERSION would be set *after* ensuring that python3 was installed, but it gets a little tricky with all of the includes. This sets it to 3.6 as nothing uses 3.5 anymore. Change-Id: I7bdfc408b7c18273639ec26eade475856ac43593
1 parent e18325c commit 78cf6f6

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

inc/python

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ function install_python3 {
463463
apt_get install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-dev
464464
elif is_suse; then
465465
install_package python3-devel python3-dbm
466+
elif is_fedora; then
467+
install_package python3 python3-devel
466468
fi
467469
}
468470

stack.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,11 @@ fi
415415

416416
# Ensure python is installed
417417
# --------------------------
418-
is_package_installed python || install_package python
418+
install_python3
419419

420+
if ! python3_enabled; then
421+
is_package_installed python || install_package python
422+
fi
420423

421424
# Configure Logging
422425
# -----------------

stackrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export USE_PYTHON3=$(trueorfalse True USE_PYTHON3)
142142
# version of Python 3 to this variable will install the app using that
143143
# version of the interpreter instead of 2.7.
144144
_DEFAULT_PYTHON3_VERSION="$(_get_python_version python3)"
145-
export PYTHON3_VERSION=${PYTHON3_VERSION:-${_DEFAULT_PYTHON3_VERSION:-3.5}}
145+
export PYTHON3_VERSION=${PYTHON3_VERSION:-${_DEFAULT_PYTHON3_VERSION:-3.6}}
146146

147147
# Just to be more explicit on the Python 2 version to use.
148148
_DEFAULT_PYTHON2_VERSION="$(_get_python_version python2)"

0 commit comments

Comments
 (0)