Skip to content

Commit

Permalink
Add a Python version check to configure as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell committed Aug 25, 2023
1 parent 808422d commit e01355f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
14 changes: 13 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -22310,7 +22310,19 @@ fi
fi
if test x${PYTHON} != xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as ctypesgen" >&5
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $PYTHON is version 3.6 or later" >&5
printf %s "checking if $PYTHON is version 3.6 or later... " >&6; }
if ! ${PYTHON} -c "import sys; assert(sys.version_info >= (3,6,0))" 2>/dev/null
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: python module will not be built" >&5
printf "%s\n" "$as_me: WARNING: python module will not be built" >&2;}
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as ctypesgen" >&5
printf %s "checking whether $PYTHON as ctypesgen... " >&6; }
if ! ${PYTHON} -c "import ctypesgen" 2>/dev/null
then :
Expand Down
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,12 @@ AS_IF([test x$enable_python != xno],
AS_IF([test x${PYTHON3} != xno],
[AC_SUBST([PYTHON], [$PYTHON3])])])
AS_IF([test x${PYTHON} != xno],
[AC_MSG_CHECKING([whether $PYTHON as ctypesgen])
[AC_MSG_CHECKING([if $PYTHON is version 3.6 or later])
AS_IF([! ${PYTHON} -c "import sys; assert(sys.version_info >= (3,6,0))" 2>/dev/null],
[AC_MSG_RESULT([no])
AC_MSG_WARN([python module will not be built])],
[AC_MSG_RESULT([yes])])
AC_MSG_CHECKING([whether $PYTHON as ctypesgen])
AS_IF([! ${PYTHON} -c "import ctypesgen" 2>/dev/null],
[AC_MSG_RESULT([no])
AC_MSG_WARN([python module will not be built])],
Expand Down

0 comments on commit e01355f

Please sign in to comment.