-
Notifications
You must be signed in to change notification settings - Fork 117
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
Android check python version #460
base: master
Are you sure you want to change the base?
Conversation
5109556
to
ea5496e
Compare
@@ -42,7 +42,7 @@ if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then | |||
else | |||
! check_root && error_msg "Please run this script as superuser!" | |||
#install_deps "git python python-lxml python-pil python-setuptools python-requests python-matplotlib python-requests ca-certificates curl tar xz-utils" "${SKIP_INSTALL}" | |||
install_deps "python3.9 python3-distutils git ca-certificates curl tar xz-utils" "${SKIP_INSTALL}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you want to drop .9 here?
curl "${url_pip}" -o get-pip.py | ||
sudo python3 get-pip.py | ||
sudo pip install virtualenv | ||
pip --version | ||
virenv_dir=python-workspace | ||
virtualenv --python=python3.9 ${virenv_dir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason to drop ".9" here?
java_path="/usr/lib/jvm/java-17-openjdk-amd64/bin/java" | ||
fi | ||
|
||
PKG_DEPS="coreutils usbutils curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect psmisc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of them are not available for 20.04, if you specify SKIP_INSTALL to false, and run on 20.04 host, it will fail.
@@ -22,6 +30,7 @@ case "${dist}" in | |||
;; | |||
esac | |||
|
|||
chech_python_version "$(python --verison)" "3.8" "Error" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, if like running Android11 cts/vts, python3.8 is not required, in fact it's just required for the AOSP master from now on. In the case of running Android11 cts/vts on Ubuntu18.04, python3.8 needs to be installed manually, otherwise it will fail here.
f10d64f
to
c4b62b2
Compare
Add a generic way to check python version if a specific minimum version is needed. Signed-off-by: Anders Roxell <[email protected]>
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 <[email protected]>
Readd install_deps so the test can install the correct dependencies without having to find them. Add a python version check that errors out if the python version isn't >=3.8. Fixes: 2caa92b ("noninteractive-tradefed: change to work with python3") Signed-off-by: Anders Roxell <[email protected]>
c4b62b2
to
7154752
Compare
No description provided.