Fix --with-2to3 configure option

This commit is contained in:
William S Fulton 2017-09-19 08:12:14 +01:00
commit 836a57190e
3 changed files with 15 additions and 5 deletions

View file

@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.0.0 (in progress)
===========================
2017-09-19: futatuki
[Python] #1003 Add --with-2to3=/path/to/2to3 option to configure.
2017-09-18: wsfulton
Fix type promotion wrapping constant expressions of the form:
# define EXPR_MIXED1 (0x80 + 11.1) - 1

View file

@ -386,7 +386,7 @@ else
PYSCRIPT = $(RUNME)3.py
endif
PY2TO3 = @PY2TO3PROG@ `@PY2TO3PROG@ -l | grep -v -E "Available|import$$" | awk '{print "-f "$$0}'`
PY2TO3 = @PY2TO3@ `@PY2TO3@ -l | grep -v -E "Available|import$$" | awk '{print "-f "$$0}'`
python_run: $(PYSCRIPT)
ifneq (,$(PEP8))

View file

@ -902,10 +902,17 @@ if test -n "$PYINCLUDE" || test -n "$PY3INCLUDE" ; then
AC_MSG_RESULT($pep8_version)
fi
fi
AC_ARG_WITH(2to3, AS_HELP_STRING([--with-2to3], [alternate 2to3 executable])
AS_HELP_STRING([--with-2to3=path], [Specify 2to3 utility path]),[ PY2TO3="$withval"], [PY2TO3="2to3"])
if [ ! -z "$PYTHON3" ] ; then
AC_CHECK_PROGS(PY2TO3PROG, $PY2TO3)
AC_ARG_WITH(2to3, AS_HELP_STRING([--with-2to3=path], [Set location of Python 2to3 tool]), [PY2TO3BIN="$withval"], [PY2TO3BIN="yes"])
if test -n "$PYTHON3"; then
if test "x$PY2TO3BIN" = xyes; then
AC_CHECK_PROGS(PY2TO3, 2to3)
else
PY2TO3="$PY2TO3BIN"
fi
if test -z "$PY2TO3"; then
PYTHON3=
fi
fi
#----------------------------------------------------------------