Skip to content

Commit

Permalink
lib/install.sh: map python to python3 for debian trixie_sid
Browse files Browse the repository at this point in the history
Link: #373
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed May 27, 2024
1 parent 9d8e5f1 commit 0a83829
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions lib/install.sh
Original file line number Diff line number Diff line change
@@ -132,17 +132,23 @@ get_dependency_file()

map_python_packages()
{
# many python2 pkgs are not available in debian 11 and higher version source anymore
# do a general mapping from python-pkg to python3-pkg
[[ "$distro-$_system_version" =~ debian-1[1-9] ]] && map_python2_to_python3

# many python2 pkgs are not available in ubuntu 20.04 and higher version source anymore
# do a general mapping from python-pkg to python3-pkg
[[ "$distro-$_system_version" =~ ubuntu-2[0-9].* ]] && map_python2_to_python3

[[ "$distro-$_system_version" =~ fedora-[3][8-9] ]] && map_python2_to_python3

[[ "$distro-$_system_version" =~ centos-[9] ]] && map_python2_to_python3
# Do a general mapping from python-pkg to python3-pkg since many python2 pkgs are not available in
# debian 11 and higher version source anymore
# ubuntu 20.04 and higher version source anymore
case "$distro-$_system_version" in
debian-1[1-9]*|debian-trixie_sid)
map_python2_to_python3
;;
ubuntu-2[0-9].*)
map_python2_to_python3
;;
fedora-[3][8-9]*)
map_python2_to_python3
;;
centos-[9]*)
map_python2_to_python3
;;
esac
}

get_dependency_packages()

0 comments on commit 0a83829

Please sign in to comment.