Python 3 on windows configure fix

For Appveyor, don't use python-config which comes from Cygwin
This commit is contained in:
William S Fulton 2015-11-28 14:27:45 +00:00
commit 4c0db9d83d

View file

@ -624,6 +624,10 @@ else
AC_MSG_RESULT($PYVER) AC_MSG_RESULT($PYVER)
if test -z "$PYVER"; then if test -z "$PYVER"; then
PYVER=0 PYVER=0
else
AC_MSG_CHECKING(for Python os.name)
PYOSNAME=`($PYTHON -c "import sys, os; sys.stdout.write(os.name)")`
AC_MSG_RESULT($PYOSNAME)
fi fi
fi fi
@ -634,9 +638,6 @@ else
AC_MSG_CHECKING(for Python exec-prefix) AC_MSG_CHECKING(for Python exec-prefix)
PYEPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)") 2>/dev/null` PYEPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)") 2>/dev/null`
AC_MSG_RESULT($PYEPREFIX) AC_MSG_RESULT($PYEPREFIX)
AC_MSG_CHECKING(for Python os.name)
PYOSNAME=`($PYTHON -c "import sys, os; sys.stdout.write(os.name)")`
AC_MSG_RESULT($PYOSNAME)
if test x"$PYOSNAME" = x"nt"; then if test x"$PYOSNAME" = x"nt"; then
# Windows installations are quite different to posix installations # Windows installations are quite different to posix installations
@ -751,7 +752,13 @@ AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[
if test x"${PY3BIN}" = xno; then if test x"${PY3BIN}" = xno; then
AC_MSG_NOTICE([Disabling Python 3.x support]) AC_MSG_NOTICE([Disabling Python 3.x support])
else else
if test -z "$PYVER"; then
PYVER=0
fi
if test "x$PY3BIN" = xyes; then if test "x$PY3BIN" = xyes; then
if test x"$PYOSNAME" = x"nt" -a $PYVER -ge 3; then
PYTHON3="$PYTHON"
else
for py_ver in 3 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 ""; do for py_ver in 3 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 ""; do
AC_CHECK_PROGS(PYTHON3, [python$py_ver]) AC_CHECK_PROGS(PYTHON3, [python$py_ver])
if test -n "$PYTHON3"; then if test -n "$PYTHON3"; then
@ -761,12 +768,12 @@ else
fi fi
fi fi
done done
fi
else else
PYTHON3="$PY3BIN" PYTHON3="$PY3BIN"
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config]) AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
fi fi
PYVER=0
if test -n "$PYTHON3"; then if test -n "$PYTHON3"; then
AC_MSG_CHECKING([for $PYTHON3 major version number]) AC_MSG_CHECKING([for $PYTHON3 major version number])
PYVER=`($PYTHON3 -c "import sys; sys.stdout.write(sys.version[[0]])") 2>/dev/null` PYVER=`($PYTHON3 -c "import sys; sys.stdout.write(sys.version[[0]])") 2>/dev/null`