@@ -6,29 +6,29 @@ find_python3() {
6
6
PYTHON=" "
7
7
# Find a suitable toolchain version, if available.
8
8
if [ " $( uname -s) " = " Darwin" ]; then
9
- PYTHON=" /Library/Frameworks/Python.Framework/Versions/3.9 /bin/python3"
9
+ PYTHON=" /Library/Frameworks/Python.Framework/Versions/3.10 /bin/python3"
10
10
elif [ " Windows_NT" = " ${OS:- } " ]; then # Magic variable in cygwin
11
- PYTHON=" C:/python/Python39 /python.exe"
11
+ PYTHON=" C:/python/Python310 /python.exe"
12
12
else
13
- # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.9 +.
14
- if [ -f " /opt/python/3.9 /bin/python3" ]; then
13
+ # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.10 +.
14
+ if [ -f " /opt/python/3.10 /bin/python3" ]; then
15
15
PYTHON=" /opt/python/Current/bin/python3"
16
- elif is_python_39 " $( command -v /opt/mongodbtoolchain/v5/bin/python3) " ; then
16
+ elif is_python_310 " $( command -v /opt/mongodbtoolchain/v5/bin/python3) " ; then
17
17
PYTHON=" /opt/mongodbtoolchain/v5/bin/python3"
18
- elif is_python_39 " $( command -v /opt/mongodbtoolchain/v4/bin/python3) " ; then
18
+ elif is_python_310 " $( command -v /opt/mongodbtoolchain/v4/bin/python3) " ; then
19
19
PYTHON=" /opt/mongodbtoolchain/v4/bin/python3"
20
- elif is_python_39 " $( command -v /opt/mongodbtoolchain/v3/bin/python3) " ; then
20
+ elif is_python_310 " $( command -v /opt/mongodbtoolchain/v3/bin/python3) " ; then
21
21
PYTHON=" /opt/mongodbtoolchain/v3/bin/python3"
22
22
fi
23
23
fi
24
- # Add a fallback system python3 if it is available and Python 3.9 +.
24
+ # Add a fallback system python3 if it is available and Python 3.10 +.
25
25
if [ -z " $PYTHON " ]; then
26
- if is_python_39 " $( command -v python3) " ; then
26
+ if is_python_310 " $( command -v python3) " ; then
27
27
PYTHON=" $( command -v python3) "
28
28
fi
29
29
fi
30
30
if [ -z " $PYTHON " ]; then
31
- echo " Cannot test without python3.9 + installed!"
31
+ echo " Cannot test without python3.10 + installed!"
32
32
exit 1
33
33
fi
34
34
echo " $PYTHON "
@@ -99,15 +99,15 @@ testinstall () {
99
99
fi
100
100
}
101
101
102
- # Function that returns success if the provided Python binary is version 3.9 or later
102
+ # Function that returns success if the provided Python binary is version 3.10 or later
103
103
# Usage:
104
- # is_python_39 /path/to/python
104
+ # is_python_310 /path/to/python
105
105
# * param1: Python binary
106
- is_python_39 () {
106
+ is_python_310 () {
107
107
if [ -z " $1 " ]; then
108
108
return 1
109
- elif $1 -c " import sys; exit(sys.version_info[:2] < (3, 9 ))" ; then
110
- # runs when sys.version_info[:2] >= (3, 9 )
109
+ elif $1 -c " import sys; exit(sys.version_info[:2] < (3, 10 ))" ; then
110
+ # runs when sys.version_info[:2] >= (3, 10 )
111
111
return 0
112
112
else
113
113
return 1
@@ -131,7 +131,7 @@ get_python_binary() {
131
131
else
132
132
PYTHON=" /opt/python/$version /bin/python3"
133
133
fi
134
- if is_python_39 " $( command -v $PYTHON ) " ; then
134
+ if is_python_310 " $( command -v $PYTHON ) " ; then
135
135
echo " $PYTHON "
136
136
else
137
137
echo " Could not find suitable python binary for '$version '" >&2
0 commit comments