From a8cdbef26044ee6adcafb8089efd27ba6a489533 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 22 Apr 2024 13:21:56 +0800 Subject: [PATCH] install-dependencies.sh: s/python/python3/ python is EOL. and the scripts in this repo actually are using python3 instead python: ```console $ find . -name '*.py' -exec grep '#!' {} \; ``` also, "python" as a package name is not available in debian and and some of its derivative distros, see https://packages.debian.org/search?keywords=python&searchon=names&suite=stable§ion=all and https://packages.ubuntu.com/search?suite=jammy§ion=all&arch=any&keywords=python3&searchon=names but python3, or better off python3-minimal is. see https://packages.debian.org/search?keywords=python3-minimal&searchon=names&suite=stable§ion=all and https://packages.ubuntu.com/search?suite=jammy§ion=all&arch=any&keywords=python3-minimal&searchon=names ubuntu/jammy is picked, because it is currently the ubuntu-latest os provided by github workflow runners. so, in this change, let's replace "python" with "python3", so that we can run `install-dependencies.sh` without error like: ``` Package python is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: 2to3 python2-minimal python2 dh-python python-is-python3 E: Package 'python' has no installation candidate ``` Closes: #391 Signed-off-by: Kefu Chai --- install-dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-dependencies.sh b/install-dependencies.sh index 9272e154b2..ced64315aa 100755 --- a/install-dependencies.sh +++ b/install-dependencies.sh @@ -20,7 +20,7 @@ . /etc/os-release if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then - apt -y install openjdk-8-jdk-headless ant ant-optional python + apt -y install openjdk-8-jdk-headless ant ant-optional python3 elif [ "$ID" = "fedora" ] || [ "$ID" = "centos" ]; then - dnf install -y --setopt=install_weak_deps=False ant java-1.8.0-openjdk-devel python ant-junit fakeroot + dnf install -y --setopt=install_weak_deps=False ant java-1.8.0-openjdk-devel python3 ant-junit fakeroot fi