File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 9
9
# twine
10
10
# setuptools
11
11
#
12
+ # caller can override $PYTHON
13
+ #
12
14
# Manually tested to run under differing environments including:
13
15
# Python 3.7 on MinGW64 shell on Windows 10
14
16
# Python 3.5.3 on Debian 9 Stretch Linux on WLS
@@ -33,12 +35,13 @@ if [[ ! "${PYTHON+x}" ]]; then
33
35
PYTHON=' python' # fallback
34
36
if which ' python3' & > /dev/null; then
35
37
PYTHON=' python3' # Linux Python 3
36
- elif which ' py' & > /dev/null; then
37
- PYTHON=' py -3 ' # Windows launcher
38
+ elif which ' py.exe ' & > /dev/null; then
39
+ PYTHON=' py.exe ' # Windows launcher, used by MinGW
38
40
fi
39
41
fi
40
42
41
43
# check $PYTHON runs
44
+ which ${PYTHON}
42
45
${PYTHON} --version
43
46
44
47
#
@@ -112,12 +115,14 @@ uninstall=false
112
115
if [[ " ${1+x} " == ' --uninstall' ]]; then
113
116
uninstall=true
114
117
fi
118
+
115
119
function on_exit(){
116
120
if ${uninstall} ; then
117
121
set -x
118
122
${PYTHON} -m pip uninstall --yes --verbose " ${PACKAGE_NAME} "
119
123
fi
120
124
}
125
+
121
126
trap on_exit EXIT
122
127
123
128
SERVER_TEST=$( readlink -f -- " ./tools/ci/server-test.sh" )
You can’t perform that action at this time.
0 commit comments