summaryrefslogtreecommitdiffstats
path: root/packaging/installer/install-required-packages.sh
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-06 08:32:22 +1000
committerGitHub <noreply@github.com>2020-03-06 08:32:22 +1000
commite51ea95e35957c5977202d53857d675dc64c7459 (patch)
tree83bb118a787f79df4b8826abbb119c86ccc392e8 /packaging/installer/install-required-packages.sh
parentc08081b43554aedf5b834fc7ccf062580ffaeb71 (diff)
Switch to pulling in Python 3 by default instead of Python 2. (#8318)
Most distros have Python 3, and some are already looking at dropping Python 2 in upcomming releases. All of our code works correctly on Python 3, so just use it by default for platforms that have it.
Diffstat (limited to 'packaging/installer/install-required-packages.sh')
-rwxr-xr-xpackaging/installer/install-required-packages.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh
index 79423b50a4..9bd566db92 100755
--- a/packaging/installer/install-required-packages.sh
+++ b/packaging/installer/install-required-packages.sh
@@ -1833,8 +1833,11 @@ if [[ "${pv}" =~ ^Python\ 2.* ]]; then
elif [[ "${pv}" =~ ^Python\ 3.* ]]; then
pv=3
PACKAGES_NETDATA_PYTHON3=1
-else
+elif [[ "${tree}" == "centos" ]] && [ "${version}" -lt 8 ]; then
pv=2
+else
+ pv=3
+ PACKAGES_NETDATA_PYTHON3=1
fi
[ "${detection}" = "/etc/os-release" ] && cat << EOF