From 1540ff451f9682f414b8bc73b5491c90f754e8ed Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 17 Nov 2018 12:22:23 +0000 Subject: [PATCH] 2to3 detection for Windows Python distributions The 2to3 standalone tool does not exist on Windows. Use the 2to3.py script instead. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index c9241d0d8..ac9efd9d5 100644 --- a/configure.ac +++ b/configure.ac @@ -911,6 +911,17 @@ if test -n "$PYTHON3"; then if test "x$PY2TO3BIN" = xyes; then py3to2=`echo $PYTHON3 | sed -e "s/python/2to3-/"` AC_CHECK_PROGS(PY2TO3, $py3to2 2to3) + if test -z "$PY2TO3"; then + # Windows distributions don't always have the 2to3 executable + AC_MSG_CHECKING(for 2to3.py) + py2to3script="$PY3PREFIX/Tools/scripts/2to3.py" + if test -f "$py2to3script"; then + AC_MSG_RESULT($py2to3script) + PY2TO3="$PYTHON3 $py2to3script" + else + AC_MSG_RESULT(Not found) + fi + fi else PY2TO3="$PY2TO3BIN" fi