Commit 43d8fd06 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Fix `wendelin_cy_searh_in_dirs`.

The interface of the function `search_include_directories` has changed
in recent versions of Cython.
This updates the replacement used by wendelin so that it works for
both newer and older versions.

Note that wendelin-core still does not work with Cython >= 3, as that
version refuses to compile Python functions that can throw C++
exceptions (apparently, mixing C++ exceptions and Cython-generated
code is not considered safe).
parent 4047d40f
......@@ -37,11 +37,11 @@ PY3 = (sys.version_info.major >= 3)
# see wendelin.py for details.
from Cython.Compiler.Main import Context as CyContext
cy_search_inc_dirs = CyContext.search_include_directories
def wendelin_cy_searh_in_dirs(self, qualified_name, suffix, pos, include=False, sys_path=False):
def wendelin_cy_searh_in_dirs(self, qualified_name, suffix=None, source_pos=None, include=False, sys_path=False, **kwargs):
_ = qualified_name.split('.')
if len(_) >= 1 and _[0] == "wendelin":
qualified_name = '.'.join(_[1:])
return cy_search_inc_dirs(self, qualified_name, suffix, pos, include, sys_path)
return cy_search_inc_dirs(self, qualified_name, suffix, source_pos, include, sys_path, **kwargs)
CyContext.search_include_directories = wendelin_cy_searh_in_dirs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment