Re: Pyrex - 'PyFrameObject' is not declared
Stefan Behnel <[email protected]> Mon, 5 Mar 2018 21:18:17 +0100
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
Hi! Sergius Master schrieb am 05.03.2018 um 11:16: > Actually, I've posted this problem to StackOverflow few days ago and get = no > answers - > https://stackoverflow.com/questions/49011021/pyrex-pyframeobject-is-not-d= eclared > I found one solution - compile on CentOS 6.5 with Python2.7 and put *.so > file to CentOS 7.4 and it looks working now, but I'm not sure if everythi= ng > is ok, because I faced a lot of problems with other approaches. > Could you help, please, to find a 100% right solution? As hinted in the answer that you got now, it might help to put an additional ctypedef struct PyFrameObject before the declaration in the "python.pxi" file. On a more general note, Pyrex hasn't been updated in many years. Since you're modernising the code anyway, consider giving Cython a try instead. It was originally based on Pyrex but is much more advanced in many ways, including Python language feature support, performance and compatibility with recent Python versions. http://cython.org/ Stefan