File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
# set -e
18
18
export PATH=$PATH :/opt/python/cp38-cp38m/bin:/opt/python/cp37-cp37m/bin:/opt/python/cp36-cp36m/bin:/opt/python/cp35-cp35m/bin:/opt/python/bin:/usr/local/bin:~ /.local/bin
19
- PYTHON_VERSION=" ` python3 --version 2> /dev/null` " || true
19
+ VERSION=" ` python3 -c " import pip,sys,venv;print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))" 2> /dev/null` "
20
+ RC=" $? "
21
+ if [ " $RC " != " 0" ]; then
22
+ PYTHON_VERSION=" "
23
+ fi
20
24
21
25
function install_python {
22
26
if [ " $PYTHON_VERSION " != " " ]; then
@@ -44,7 +48,7 @@ function install_pyrun {
44
48
python -m pypirun.utility 2> /dev/null
45
49
RC=" $? "
46
50
if [ " $RC " != " 0" ]; then
47
- python3 -m pip install -q --user pypirun 2> /dev/null
51
+ python3 -m pip install -q pypirun 2> /dev/null
48
52
fi
49
53
}
50
54
@@ -58,7 +62,7 @@ function pyrun_command {
58
62
}
59
63
60
64
function ensure_venv_works {
61
- python3 -m venv /tmp/foo > /dev/null 2>&1
65
+ python3 -m venv --clear /tmp/foo > /dev/null 2>&1
62
66
RC=" $? "
63
67
if [ " $RC " = " 1" ]; then
64
68
PYTHON_VERSION=" "
You can’t perform that action at this time.
0 commit comments