File tree 6 files changed +31
-22
lines changed
6 files changed +31
-22
lines changed Original file line number Diff line number Diff line change 3
3
4
4
# This script is executed with two arguments passed to it:
5
5
#
6
- # $1 - full path to environment python (python used inside virtual
7
- # environment created by tox)
8
- # $2 - full path to system python (python 3.x installed on the system)
6
+ # $1 - path to environment python (python used inside virtual environment
7
+ # created by tox)
8
+ # $2 - path to system python (python 3.x installed on the system)
9
9
10
10
set -e
11
11
@@ -17,8 +17,9 @@ TOPDIR=$(readlink -f ${SCRIPTDIR}/..)
17
17
. ${SCRIPTDIR} /utils.sh
18
18
. ${SCRIPTDIR} /config.sh
19
19
20
- ENVPYTHON=$1
21
- SYSPYTHON=$2
20
+ # Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463):
21
+ ENVPYTHON=$( readlink -f $1 )
22
+ SYSPYTHON=$( readlink -f $2 )
22
23
shift 2
23
24
24
25
# Write your custom commands here that should be run when `tox -e custom`:
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: MIT
3
3
4
- # Run black (the Python formatter). The first script argument is a full path
5
- # to Python interpreter, the rest of arguments are passed to black.
4
+ # Run black (the Python formatter). The first script argument is a path to
5
+ # Python interpreter, the rest of arguments are passed to black.
6
6
7
7
# Environment variables:
8
8
#
@@ -31,7 +31,9 @@ if [[ "${RUN_BLACK_DISABLED}" ]]; then
31
31
exit 0
32
32
fi
33
33
34
- ENVPYTHON=$1
34
+ # Sanitize path in case if running within tox (see
35
+ # https://github.com/tox-dev/tox/issues/1463):
36
+ ENVPYTHON=$( readlink -f $1 )
35
37
shift
36
38
37
39
DEFAULT_INCLUDE=' ^[^.].*\.py$'
Original file line number Diff line number Diff line change 4
4
# Report coverage results using coveralls. The script is executed with these
5
5
# parameters:
6
6
#
7
- # $1 - full path to environment python
8
- # $2 - full path to system python
7
+ # $1 - path to environment python
8
+ # $2 - path to system python
9
9
#
10
10
# coveralls is executed only if $1 coincides with $2 and $1's environment is
11
11
# stable, i.e. TRAVIS_PYTHON_VERSION is of the form [:digit:] "." [:digit:]
@@ -32,8 +32,9 @@ if [[ -z "${LSR_PUBLISH_COVERAGE}" ]]; then
32
32
exit 0
33
33
fi
34
34
35
- ENVPYTHON=$1
36
- SYSPYTHON=$2
35
+ # Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463):
36
+ ENVPYTHON=$( readlink -f $1 )
37
+ SYSPYTHON=$( readlink -f $2 )
37
38
shift 2
38
39
39
40
if lsr_compare_pythons ${ENVPYTHON} -ne ${SYSPYTHON} ; then
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: MIT
3
3
4
- # Run flake8. The first script argument is a full path to Python interpreter,
5
- # the rest of arguments are passed to flake8.
4
+ # Run flake8. The first script argument is a path to Python interpreter, the
5
+ # rest of arguments are passed to flake8.
6
6
7
7
# Environment variables:
8
8
#
@@ -23,7 +23,9 @@ if [[ "${RUN_FLAKE8_DISABLED}" ]]; then
23
23
exit 0
24
24
fi
25
25
26
- ENVPYTHON=$1
26
+ # Sanitize path in case if running within tox (see
27
+ # https://github.com/tox-dev/tox/issues/1463):
28
+ ENVPYTHON=$( readlink -f $1 )
27
29
shift
28
30
29
31
set -x
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: MIT
3
3
4
- # Wrapper around pytest. First argument is a full path to environment python,
5
- # the rest of arguments are passed to pytest.
4
+ # Wrapper around pytest. First argument is a path to environment python, the
5
+ # rest of arguments are passed to pytest.
6
6
7
7
set -e
8
8
@@ -18,7 +18,9 @@ if [[ ! -d ${TOPDIR}/tests/unit ]]; then
18
18
exit 0
19
19
fi
20
20
21
- ENVPYTHON=$1
21
+ # Sanitize path in case if running within tox (see
22
+ # https://github.com/tox-dev/tox/issues/1463):
23
+ ENVPYTHON=$( readlink -f $1 )
22
24
shift
23
25
24
26
PYTEST_OPTS=()
Original file line number Diff line number Diff line change 5
5
# to system python libraries, especially C bindings. The script is run with
6
6
# these arguments:
7
7
#
8
- # $1 - full path to environment python
9
- # $2 - full path to system python
8
+ # $1 - path to environment python
9
+ # $2 - path to system python
10
10
# $3 - command runnable in Python (should be present in $PATH)
11
11
# ${@:4} - arguments passed to $3
12
12
@@ -23,8 +23,9 @@ TOPDIR=$(readlink -f ${SCRIPTDIR}/..)
23
23
# Run user defined hook from .travis/config.sh.
24
24
lsr_runsyspycmd_hook " $@ "
25
25
26
- ENVPYTHON=$1
27
- SYSPYTHON=$2
26
+ # Sanitize arguments (see https://github.com/tox-dev/tox/issues/1463):
27
+ ENVPYTHON=$( readlink -f $1 )
28
+ SYSPYTHON=$( readlink -f $2 )
28
29
shift 2
29
30
30
31
if lsr_compare_pythons ${ENVPYTHON} -ne ${SYSPYTHON} ; then
You can’t perform that action at this time.
0 commit comments