From c981944f52b0bfd172a0b6fa66878d017b09e72f Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Tue, 21 Jul 2020 00:59:42 +0200 Subject: [PATCH] Fixing python --- script/solve_python | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/script/solve_python b/script/solve_python index 1de15da80..de86333d2 100755 --- a/script/solve_python +++ b/script/solve_python @@ -10,10 +10,25 @@ if [ x"$pcman" = x"" ]; then exit 1 fi +if [ x"$pcman" == x"apt" ]; then + apt-cache show python-is-python3 | grep -q "python-is-python3" + if [ $? -eq 0 ]; then + additional_python_pkg="python-is-python3" + fi + apt-cache show python | grep -q "python" + if [ $? -eq 0 ]; then + base_python_pkg="python" + fi + apt-cache show python2 | grep -q "python2" + if [ $? -eq 0 ]; then + base_python_pkg="python2 $base_python_pkg" + fi +fi + if [ x"$1" = x"linux" ]; then pc_install_command "$pcman" - commands[0]="su -c \"$pc_install_command_ret python\"" - commands[1]="sudo $pc_install_command_ret python" + commands[0]="su -c \"$pc_install_command_ret $base_python_pkg $additional_python_pkg\"" + commands[1]="sudo $pc_install_command_ret $base_python_pkg $additional_python_pkg" possible_solutions "${commands[@]}" fi } -- GitLab