Skip to content

Commit 7588465

Browse files
committed
android: apk-automation: don't hardcode python version
Don't hardcode installing python3.9, because the call trace says >=python3.9, so later versions works too. Add a check that error's out if the installed python version isn't >=3.9. Fixes: 7220645 ("apk-automation: install and use python3.9") Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
1 parent 5c4c25b commit 7588465

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

automated/android/apk-automation/apk-automation.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then
4242
else
4343
! check_root && error_msg "Please run this script as superuser!"
4444
#install_deps "git python python-lxml python-pil python-setuptools python-requests python-matplotlib python-requests ca-certificates curl tar xz-utils" "${SKIP_INSTALL}"
45-
install_deps "python3.9 python3-distutils git ca-certificates curl tar xz-utils" "${SKIP_INSTALL}"
45+
install_deps "python3 python3-distutils git ca-certificates curl tar xz-utils" "${SKIP_INSTALL}"
4646
if python3 --version|grep 'Python 3.6'; then
4747
# Workaround for Ubuntu 18.04 Bionic version.
4848
# ModuleNotFoundError: No module named 'distutils.cmd' needs python3-distutils
@@ -53,12 +53,13 @@ else
5353
url_android_view_clien="https://github.com/dtmilano/AndroidViewClient"
5454
fi
5555

56+
chech_python_version "$(python --verison)" "3.9" "Error"
5657
curl "${url_pip}" -o get-pip.py
5758
sudo python3 get-pip.py
5859
sudo pip install virtualenv
5960
pip --version
6061
virenv_dir=python-workspace
61-
virtualenv --python=python3.9 ${virenv_dir}
62+
virtualenv --python=python3 ${virenv_dir}
6263
[ ! -d AndroidViewClient ] && git clone --depth 1 "${url_android_view_clien}"
6364
# shellcheck disable=SC1090
6465
source ${virenv_dir}/bin/activate

0 commit comments

Comments
 (0)