Python 3 on windows configure fix
For Appveyor, don't use python-config which comes from Cygwin
This commit is contained in:
parent
80a8a7f0d8
commit
4c0db9d83d
1 changed files with 19 additions and 12 deletions
31
configure.ac
31
configure.ac
|
|
@ -624,6 +624,10 @@ else
|
|||
AC_MSG_RESULT($PYVER)
|
||||
if test -z "$PYVER"; then
|
||||
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
|
||||
|
||||
|
|
@ -634,9 +638,6 @@ else
|
|||
AC_MSG_CHECKING(for Python exec-prefix)
|
||||
PYEPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)") 2>/dev/null`
|
||||
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
|
||||
# Windows installations are quite different to posix installations
|
||||
|
|
@ -751,22 +752,28 @@ AS_HELP_STRING([--with-python3=path], [Set location of Python 3.x executable]),[
|
|||
if test x"${PY3BIN}" = xno; then
|
||||
AC_MSG_NOTICE([Disabling Python 3.x support])
|
||||
else
|
||||
if test -z "$PYVER"; then
|
||||
PYVER=0
|
||||
fi
|
||||
if test "x$PY3BIN" = xyes; then
|
||||
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])
|
||||
if test -n "$PYTHON3"; then
|
||||
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
|
||||
if test -n "$PY3CONFIG"; then
|
||||
break
|
||||
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
|
||||
AC_CHECK_PROGS(PYTHON3, [python$py_ver])
|
||||
if test -n "$PYTHON3"; then
|
||||
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
|
||||
if test -n "$PY3CONFIG"; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
else
|
||||
PYTHON3="$PY3BIN"
|
||||
AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config])
|
||||
fi
|
||||
|
||||
PYVER=0
|
||||
if test -n "$PYTHON3"; then
|
||||
AC_MSG_CHECKING([for $PYTHON3 major version number])
|
||||
PYVER=`($PYTHON3 -c "import sys; sys.stdout.write(sys.version[[0]])") 2>/dev/null`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue