From b659543dfa28a533340bd3cbd7ca007efdddf268 Mon Sep 17 00:00:00 2001 From: mattip Date: Wed, 4 Mar 2020 12:04:07 +0200 Subject: [PATCH] set and use PYTHON_EXE --- common_utils.sh | 6 +++--- docker_test_wrap.sh | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common_utils.sh b/common_utils.sh index 01b7be15..854fa9db 100644 --- a/common_utils.sh +++ b/common_utils.sh @@ -336,10 +336,10 @@ function install_wheel { local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse}) if [ -n "$TEST_DEPENDS" ]; then while read TEST_DEPENDENCY; do - python -mpip install $(pip_opts) $@ $TEST_DEPENDENCY + $PYTHON_EXE -mpip install $(pip_opts) $@ $TEST_DEPENDENCY done <<< "$TEST_DEPENDS" fi - python -mpip install packaging + $PYTHON_EXE -mpip install packaging local supported_wheels=$(python $MULTIBUILD_DIR/supported_wheels.py $wheelhouse/*.whl) if [ -z "$supported_wheels" ]; then echo "ERROR: no supported wheels found" @@ -347,7 +347,7 @@ function install_wheel { exit 1 fi # Install compatible wheel - python -mpip install $(pip_opts) $@ $supported_wheels + $PYTHON_EXE -mpip install $(pip_opts) $@ $supported_wheels } function install_run { diff --git a/docker_test_wrap.sh b/docker_test_wrap.sh index a37b7e0e..fa46de78 100755 --- a/docker_test_wrap.sh +++ b/docker_test_wrap.sh @@ -2,6 +2,13 @@ # Install and test steps on Linux set -e +# "python" and "pip" are already on the path as part of the docker +# startup code in choose_python.sh, but the following are required and not +# necessarily already set + +PYTHON_EXE=${PYTHON_EXE:-python} +PIP_CMD=${PIP_CMD:-pip} + # Get needed utilities MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}") source $MULTIBUILD_DIR/common_utils.sh