From 2258cfeb11361a11e989b3ebc34a34c3fa291917 Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Tue, 24 Sep 2019 20:37:54 +0100 Subject: automated/android: fix apk-automation installation error New version of matplotlib requires python3. This patch makes sure that python2 version of matplotlib is installed Signed-off-by: Milosz Wasilewski --- automated/android/apk-automation/apk-automation.sh | 4 ++-- automated/android/apk-automation/common/__init__.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'automated/android') diff --git a/automated/android/apk-automation/apk-automation.sh b/automated/android/apk-automation/apk-automation.sh index 6ea943d..937b956 100755 --- a/automated/android/apk-automation/apk-automation.sh +++ b/automated/android/apk-automation/apk-automation.sh @@ -39,8 +39,8 @@ if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then info_msg "Package installation skipped" else ! check_root && error_msg "Please run this script as superuser!" - install_deps "git python python-lxml python-pil python-setuptools python-requests ca-certificates curl tar xz-utils" "${SKIP_INSTALL}" - git clone https://github.com/dtmilano/AndroidViewClient + install_deps "git python python-lxml python-pil python-setuptools python-requests python-matplotlib python-requests ca-certificates curl tar xz-utils" "${SKIP_INSTALL}" + git clone --depth 1 https://github.com/dtmilano/AndroidViewClient ( cd AndroidViewClient/ || exit python setup.py install diff --git a/automated/android/apk-automation/common/__init__.py b/automated/android/apk-automation/common/__init__.py index 33814f0..f000ac8 100755 --- a/automated/android/apk-automation/common/__init__.py +++ b/automated/android/apk-automation/common/__init__.py @@ -9,7 +9,10 @@ import shutil import subprocess import sys import time -import urlparse +try: + import urlparse +except ImportError: + from urllib.parse import urlparse from com.dtmilano.android.viewclient import ViewClient -- cgit v1.2.3