Mercurial > vim
changeset 16718:9aa87f5aab55 v8.1.1361
patch 8.1.1361: Python setuptools don't work with Python 3
commit https://github.com/vim/vim/commit/0b0ad35c339b8ad156df493bebeb77e02b32b120
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 20 21:52:45 2019 +0200
patch 8.1.1361: Python setuptools don't work with Python 3
Problem: Python setuptools don't work with Python 3.
Solution: Add dummy implementation for find_module. (Joel Frederico,
closes #4402, closes #3984
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 May 2019 22:00:05 +0200 |
parents | 94be3f45281f |
children | 27f2a2799604 |
files | src/if_py_both.h src/version.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -1222,6 +1222,14 @@ FinderFindSpec(PyObject *self, PyObject return spec; } + + static PyObject * +FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED) +{ + // Apparently returning None works. + Py_INCREF(Py_None); + return Py_None; +} #else static PyObject * call_load_module(char *name, int len, PyObject *find_module_result) @@ -1400,9 +1408,8 @@ static struct PyMethodDef VimMethods[] = {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"}, #if PY_VERSION_HEX >= 0x030700f0 {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"}, -#else +#endif {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"}, -#endif {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"}, {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"}, { NULL, NULL, 0, NULL}