Skip to content

Commit 360a571

Browse files
committed
Update Python version check
1 parent 8b0de02 commit 360a571

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9327,6 +9327,18 @@ fi
93279327
as_fn_error $? "python3 is required for --enable-mcp-server but was not found" "$LINENO" 5
93289328
fi
93299329

9330+
# Check Python version >= 3.10
9331+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version for mcp-server" >&5
9332+
$as_echo_n "checking Python version for mcp-server... " >&6; }
9333+
PYTHON_VERSION=`$PYTHON3 -c "import sys; print('%d.%d' % (sys.version_info.major, sys.version_info.minor))"`
9334+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_VERSION" >&5
9335+
$as_echo "$PYTHON_VERSION" >&6; }
9336+
9337+
PYTHON_VERSION_OK=`$PYTHON3 -c "import sys; print('yes' if sys.version_info >= (3, 10) else 'no')"`
9338+
if test "$PYTHON_VERSION_OK" != "yes"; then
9339+
as_fn_error $? "Python 3.10 or later is required for --enable-mcp-server, found $PYTHON_VERSION" "$LINENO" 5
9340+
fi
9341+
93309342
# Check for uv (Python package manager)
93319343
# Extract the first word of "uv", so it can be a program name with args.
93329344
set dummy uv; ac_word=$2

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,16 @@ if test "$enable_mcp_server" = yes; then
959959
AC_MSG_ERROR([python3 is required for --enable-mcp-server but was not found])
960960
fi
961961

962+
# Check Python version >= 3.10
963+
AC_MSG_CHECKING([Python version for mcp-server])
964+
PYTHON_VERSION=`$PYTHON3 -c "import sys; print('%d.%d' % (sys.version_info.major, sys.version_info.minor))"`
965+
AC_MSG_RESULT([$PYTHON_VERSION])
966+
967+
PYTHON_VERSION_OK=`$PYTHON3 -c "import sys; print('yes' if sys.version_info >= (3, 10) else 'no')"`
968+
if test "$PYTHON_VERSION_OK" != "yes"; then
969+
AC_MSG_ERROR([Python 3.10 or later is required for --enable-mcp-server, found $PYTHON_VERSION])
970+
fi
971+
962972
# Check for uv (Python package manager)
963973
AC_PATH_PROG([UV], [uv])
964974
if test -z "$UV"; then

0 commit comments

Comments
 (0)