mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
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
This commit is contained in:
@@ -1222,6 +1222,14 @@ FinderFindSpec(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
return spec;
|
return spec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *
|
||||||
|
FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED)
|
||||||
|
{
|
||||||
|
// Apparently returning None works.
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return Py_None;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static PyObject *
|
static PyObject *
|
||||||
call_load_module(char *name, int len, PyObject *find_module_result)
|
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"},
|
{"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"},
|
||||||
#if PY_VERSION_HEX >= 0x030700f0
|
#if PY_VERSION_HEX >= 0x030700f0
|
||||||
{"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"},
|
{"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"},
|
||||||
#else
|
|
||||||
{"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"},
|
|
||||||
#endif
|
#endif
|
||||||
|
{"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"},
|
||||||
{"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"},
|
{"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"},
|
{"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"},
|
||||||
{ NULL, NULL, 0, NULL}
|
{ NULL, NULL, 0, NULL}
|
||||||
|
@@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1361,
|
||||||
/**/
|
/**/
|
||||||
1360,
|
1360,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user