Ticket #47090: patch-python.diff

File patch-python.diff, 3.0 KB (added by joelfred@…, 10 years ago)

New patch file for python variants.

  • src/configure.in

    unchanged:
    old new  
    10691069  fi
    10701070
    10711071  dnl -- find the python executable
    1072   AC_PATH_PROGS(vi_cv_path_python, python2 python)
     1072  AC_MSG_CHECKING(--with-python argument)
     1073  AC_ARG_WITH(python, [  --with-python=PATH       which python to use (default: python)],
     1074        python_name="$withval"; AC_MSG_RESULT($python_name),
     1075        python_name="python"; AC_MSG_RESULT(no))
     1076  AC_SUBST(vi_cv_path_python, $python_name)
    10731077  if test "X$vi_cv_path_python" != "X"; then
    10741078
    10751079    dnl -- get its version number
     
    11531157            dnl -- delete the lines from make about Entering/Leaving directory
    11541158            eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
    11551159            rm -f -- "${tmp_mkf}"
    1156             if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
    1157                 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
    1158               vi_cv_path_python_plibs="-framework Python"
    1159             else
    1160               if test "${vi_cv_var_python_version}" = "1.4"; then
    1161                   vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
    1162               else
    1163                   vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
    1164               fi
    1165               vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
    1166               dnl remove -ltermcap, it can conflict with an earlier -lncurses
    1167               vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    1168             fi
     1160            vi_cv_path_python_plibs="`${vi_cv_path_python}-config --ldflags`"
     1161            dnl remove -ltermcap, it can conflict with an earlier -lncurses
     1162            vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
    11691163        ])
    11701164        AC_CACHE_VAL(vi_cv_dll_name_python,
    11711165        [
     
    11771171        ])
    11781172
    11791173        PYTHON_LIBS="${vi_cv_path_python_plibs}"
    1180         if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
    1181           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    1182         else
    1183           PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    1184         fi
     1174        PYTHON_CFLAGS="`${vi_cv_path_python}-config --includes` -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
    11851175        PYTHON_SRC="if_python.c"
    11861176        PYTHON_OBJ="objects/if_python.o"
    11871177        if test "${vi_cv_var_python_version}" = "1.4"; then
  • src/if_python.c

    only in patch2:
    unchanged:
    old new  
    5555
    5656#define PY_SSIZE_T_CLEAN
    5757
    58 #ifdef FEAT_GUI_MACVIM
    59 # include <Python/Python.h>
    60 #else
    61 # include <Python.h>
    62 #endif
     58#include <Python.h>
    6359
    6460#if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
    6561# undef PY_SSIZE_T_CLEAN