From d0f2ed713773df2a6662978cd6a52d761175d0f8 Mon Sep 17 00:00:00 2001 From: Lucy Phipps Date: Tue, 5 Oct 2021 13:24:32 +0100 Subject: [PATCH] setup-ubuntu.sh: use deadsnakes/ppa if needed --- scripts/setup-ubuntu.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index 6ddfb456b..5617bb69d 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -212,6 +212,11 @@ fi $SUDO dpkg --add-architecture i386 $SUDO apt-get -yq update +# Newer Python versions for host builds +if dpkg --compare-versions $(lsb_release -rs) lt 21.04; then + $SUDO add-apt-repository ppa:deadsnakes/ppa +fi + $SUDO DEBIAN_FRONTEND=noninteractive \ apt-get install -yq --no-install-recommends $PACKAGES