@@ -4,8 +4,8 @@ set -o xtrace
44
55find_python3 () {
66 PYTHON=" "
7- # Add a fallback system python3 if it is available and Python 3.8 +.
8- if is_python_38 " $( command -v python3) " ; then
7+ # Add a fallback system python3 if it is available and Python 3.9 +.
8+ if is_python_39 " $( command -v python3) " ; then
99 PYTHON=" $( command -v python3) "
1010 fi
1111 # Find a suitable toolchain version, if available.
@@ -14,23 +14,23 @@ find_python3() {
1414 if [ -d " /Library/Frameworks/Python.Framework/Versions/3.10" ]; then
1515 PYTHON=" /Library/Frameworks/Python.Framework/Versions/3.10/bin/python3"
1616 # macos 10.14
17- elif [ -d " /Library/Frameworks/Python.Framework/Versions/3.8 " ]; then
18- PYTHON=" /Library/Frameworks/Python.Framework/Versions/3.8 /bin/python3"
17+ elif [ -d " /Library/Frameworks/Python.Framework/Versions/3.9 " ]; then
18+ PYTHON=" /Library/Frameworks/Python.Framework/Versions/3.9 /bin/python3"
1919 fi
2020 elif [ " Windows_NT" = " $OS " ]; then # Magic variable in cygwin
21- PYTHON=" C:/python/Python38 /python.exe"
21+ PYTHON=" C:/python/Python39 /python.exe"
2222 else
23- # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.8 +.
24- if [ -f " /opt/python/3.8 /bin/python3" ]; then
25- PYTHON=" /opt/python/3.8 /bin/python3"
26- elif is_python_38 " $( command -v /opt/mongodbtoolchain/v4/bin/python3) " ; then
23+ # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.9 +.
24+ if [ -f " /opt/python/3.9 /bin/python3" ]; then
25+ PYTHON=" /opt/python/3.9 /bin/python3"
26+ elif is_python_39 " $( command -v /opt/mongodbtoolchain/v4/bin/python3) " ; then
2727 PYTHON=" /opt/mongodbtoolchain/v4/bin/python3"
28- elif is_python_38 " $( command -v /opt/mongodbtoolchain/v3/bin/python3) " ; then
28+ elif is_python_39 " $( command -v /opt/mongodbtoolchain/v3/bin/python3) " ; then
2929 PYTHON=" /opt/mongodbtoolchain/v3/bin/python3"
3030 fi
3131 fi
3232 if [ -z " $PYTHON " ]; then
33- echo " Cannot test without python3.8 + installed!"
33+ echo " Cannot test without python3.9 + installed!"
3434 exit 1
3535 fi
3636 echo " $PYTHON "
@@ -96,15 +96,15 @@ testinstall () {
9696 fi
9797}
9898
99- # Function that returns success if the provided Python binary is version 3.8 or later
99+ # Function that returns success if the provided Python binary is version 3.9 or later
100100# Usage:
101- # is_python_38 /path/to/python
101+ # is_python_39 /path/to/python
102102# * param1: Python binary
103- is_python_38 () {
103+ is_python_39 () {
104104 if [ -z " $1 " ]; then
105105 return 1
106- elif $1 -c " import sys; exit(sys.version_info[:2] < (3, 8 ))" ; then
107- # runs when sys.version_info[:2] >= (3, 8 )
106+ elif $1 -c " import sys; exit(sys.version_info[:2] < (3, 9 ))" ; then
107+ # runs when sys.version_info[:2] >= (3, 9 )
108108 return 0
109109 else
110110 return 1
0 commit comments