Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: environment_install: set python3 as default on ubuntu #20281

Merged
merged 1 commit into from May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions Tools/environment_install/install-prereqs-ubuntu.sh
Expand Up @@ -59,18 +59,24 @@ fi

# Checking Ubuntu release to adapt software version to install
RELEASE_CODENAME=$(lsb_release -c -s)
PYTHON_V="python" # starting from ubuntu 20.04, python isn't symlink to default python interpreter
PIP=pip2
PYTHON_V="python3" # starting from ubuntu 20.04, python isn't symlink to default python interpreter
PIP=pip3

if [ ${RELEASE_CODENAME} == 'xenial' ]; then
SITLFML_VERSION="2.3v5"
SITLCFML_VERSION="2.3"
PYTHON_V="python2"
PIP=pip2
elif [ ${RELEASE_CODENAME} == 'disco' ]; then
SITLFML_VERSION="2.5"
SITLCFML_VERSION="2.5"
PYTHON_V="python2"
PIP=pip2
elif [ ${RELEASE_CODENAME} == 'eoan' ]; then
SITLFML_VERSION="2.5"
SITLCFML_VERSION="2.5"
PYTHON_V="python2"
PIP=pip2
elif [ ${RELEASE_CODENAME} == 'focal' ] || [ ${RELEASE_CODENAME} == 'ulyssa' ]; then
SITLFML_VERSION="2.5"
SITLCFML_VERSION="2.5"
Expand All @@ -92,6 +98,8 @@ elif [ ${RELEASE_CODENAME} == 'groovy' ] ||
elif [ ${RELEASE_CODENAME} == 'trusty' ]; then
SITLFML_VERSION="2"
SITLCFML_VERSION="2"
PYTHON_V="python2"
PIP=pip2
else
# We assume APT based system, so let's try with apt-cache first.
SITLCFML_VERSION=$(apt-cache search -n '^libcsfml-audio' | cut -d" " -f1 | head -1 | grep -Eo '[+-]?[0-9]+([.][0-9]+)?')
Expand Down