From b2b37edb437d98829ad538731dab990ee41502ea Mon Sep 17 00:00:00 2001 From: Sean Morgan Date: Thu, 1 Aug 2019 09:21:29 -0400 Subject: [PATCH 1/2] Install python3.6 only when testing with python3 --- tools/run_docker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_docker.sh b/tools/run_docker.sh index 9bbbfa3dbe..85c0d8714e 100755 --- a/tools/run_docker.sh +++ b/tools/run_docker.sh @@ -75,8 +75,8 @@ case ${DEVICE} in esac case ${PYTHON} in - py2) PYTHON_LIB=/usr/bin/python2;; - py3) PYTHON_LIB=/usr/bin/python3;; + py2) ENVIRONMENT_CMD="ln -sf /usr/bin/python2 /usr/bin/python";; + py3) ENVIRONMENT_CMD="tools/ci_testing/install_py36.sh && ln -sf /usr/bin/python3 /usr/bin/python";; *) echo "Invalid or missing python $OPTARG" exit 1 @@ -88,7 +88,7 @@ if [[ -z "${COMMAND}" ]]; then exit 1 fi -DOCKER_CMD="tools/ci_testing/install_py36.sh && ln -sf ${PYTHON_LIB} /usr/bin/python && ${COMMAND}" +DOCKER_CMD="${ENVIRONMENT_CMD} && ${COMMAND}" echo "Docker image: ${DOCKER_IMAGE}" echo "Docker command: ${DOCKER_CMD}" docker run ${DOCKER_OPTS} \ From d0ead1c30d2cfef15ddb8efb1289bb3d484fefc1 Mon Sep 17 00:00:00 2001 From: Sean Morgan Date: Thu, 1 Aug 2019 09:24:43 -0400 Subject: [PATCH 2/2] Specify py3.6 --- tools/run_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_docker.sh b/tools/run_docker.sh index 85c0d8714e..4c91947250 100755 --- a/tools/run_docker.sh +++ b/tools/run_docker.sh @@ -76,7 +76,7 @@ esac case ${PYTHON} in py2) ENVIRONMENT_CMD="ln -sf /usr/bin/python2 /usr/bin/python";; - py3) ENVIRONMENT_CMD="tools/ci_testing/install_py36.sh && ln -sf /usr/bin/python3 /usr/bin/python";; + py3) ENVIRONMENT_CMD="tools/ci_testing/install_py36.sh && ln -sf /usr/bin/python3.6 /usr/bin/python";; *) echo "Invalid or missing python $OPTARG" exit 1