diff --git a/.travis/custom.sh b/.travis/custom.sh index 1b290d0..ac58205 100755 --- a/.travis/custom.sh +++ b/.travis/custom.sh @@ -3,9 +3,9 @@ # This script is executed with two arguments passed to it: # -# $1 - full path to environment python (python used inside virtual -# environment created by tox) -# $2 - full path to system python (python 3.x installed on the system) +# $1 - path to environment python (python used inside virtual environment +# created by tox) +# $2 - path to system python (python 3.x installed on the system) set -e @@ -17,8 +17,9 @@ TOPDIR=$(readlink -f ${SCRIPTDIR}/..) . ${SCRIPTDIR}/utils.sh . ${SCRIPTDIR}/config.sh -ENVPYTHON=$1 -SYSPYTHON=$2 +# Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) +SYSPYTHON=$(readlink -f $2) shift 2 # Write your custom commands here that should be run when `tox -e custom`: diff --git a/.travis/runblack.sh b/.travis/runblack.sh index 0dd0b44..33faa53 100755 --- a/.travis/runblack.sh +++ b/.travis/runblack.sh @@ -1,8 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Run black (the Python formatter). The first script argument is a full path -# to Python interpreter, the rest of arguments are passed to black. +# Run black (the Python formatter). The first script argument is a path to +# Python interpreter, the rest of arguments are passed to black. # Environment variables: # @@ -31,7 +31,9 @@ if [[ "${RUN_BLACK_DISABLED}" ]]; then exit 0 fi -ENVPYTHON=$1 +# Sanitize path in case if running within tox (see +# https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) shift DEFAULT_INCLUDE='^[^.].*\.py$' diff --git a/.travis/runcoveralls.sh b/.travis/runcoveralls.sh index 466ae07..f359c45 100755 --- a/.travis/runcoveralls.sh +++ b/.travis/runcoveralls.sh @@ -4,8 +4,8 @@ # Report coverage results using coveralls. The script is executed with these # parameters: # -# $1 - full path to environment python -# $2 - full path to system python +# $1 - path to environment python +# $2 - path to system python # # coveralls is executed only if $1 coincides with $2 and $1's environment is # stable, i.e. TRAVIS_PYTHON_VERSION is of the form [:digit:] "." [:digit:] @@ -32,8 +32,9 @@ if [[ -z "${LSR_PUBLISH_COVERAGE}" ]]; then exit 0 fi -ENVPYTHON=$1 -SYSPYTHON=$2 +# Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) +SYSPYTHON=$(readlink -f $2) shift 2 if lsr_compare_pythons ${ENVPYTHON} -ne ${SYSPYTHON}; then diff --git a/.travis/runflake8.sh b/.travis/runflake8.sh index 72fd94a..9e048a6 100755 --- a/.travis/runflake8.sh +++ b/.travis/runflake8.sh @@ -1,8 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Run flake8. The first script argument is a full path to Python interpreter, -# the rest of arguments are passed to flake8. +# Run flake8. The first script argument is a path to Python interpreter, the +# rest of arguments are passed to flake8. # Environment variables: # @@ -23,7 +23,9 @@ if [[ "${RUN_FLAKE8_DISABLED}" ]]; then exit 0 fi -ENVPYTHON=$1 +# Sanitize path in case if running within tox (see +# https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) shift set -x diff --git a/.travis/runpytest.sh b/.travis/runpytest.sh index 33b32b5..eda5c9d 100755 --- a/.travis/runpytest.sh +++ b/.travis/runpytest.sh @@ -1,8 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: MIT -# Wrapper around pytest. First argument is a full path to environment python, -# the rest of arguments are passed to pytest. +# Wrapper around pytest. First argument is a path to environment python, the +# rest of arguments are passed to pytest. set -e @@ -18,7 +18,9 @@ if [[ ! -d ${TOPDIR}/tests/unit ]]; then exit 0 fi -ENVPYTHON=$1 +# Sanitize path in case if running within tox (see +# https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) shift PYTEST_OPTS=() diff --git a/.travis/runsyspycmd.sh b/.travis/runsyspycmd.sh index ff36ed9..7865924 100755 --- a/.travis/runsyspycmd.sh +++ b/.travis/runsyspycmd.sh @@ -5,8 +5,8 @@ # to system python libraries, especially C bindings. The script is run with # these arguments: # -# $1 - full path to environment python -# $2 - full path to system python +# $1 - path to environment python +# $2 - path to system python # $3 - command runnable in Python (should be present in $PATH) # ${@:4} - arguments passed to $3 @@ -23,8 +23,9 @@ TOPDIR=$(readlink -f ${SCRIPTDIR}/..) # Run user defined hook from .travis/config.sh. lsr_runsyspycmd_hook "$@" -ENVPYTHON=$1 -SYSPYTHON=$2 +# Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463): +ENVPYTHON=$(readlink -f $1) +SYSPYTHON=$(readlink -f $2) shift 2 if lsr_compare_pythons ${ENVPYTHON} -ne ${SYSPYTHON}; then