From master.sergius at gmail.com Mon Mar 5 11:16:45 2018 From: master.sergius at gmail.com (Sergius Master) Date: Mon, 5 Mar 2018 12:16:45 +0200 Subject: [Pyrex] Pyrex - 'PyFrameObject' is not declared Message-ID: Hello, Actually, I've posted this problem to StackOverflow few days ago and get no answers - https://stackoverflow.com/questions/49011021/pyrex-pyframeobject-is-not-declared 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 everything is ok, because I faced a lot of problems with other approaches. Could you help, please, to find a 100% right solution? -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan_ml at behnel.de Mon Mar 5 21:18:17 2018 From: stefan_ml at behnel.de (Stefan Behnel) Date: Mon, 5 Mar 2018 21:18:17 +0100 Subject: [Pyrex] Pyrex - 'PyFrameObject' is not declared In-Reply-To: References: Message-ID: <53366ec2-7f9d-f836-e6c1-90e9f485f029@behnel.de> 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-declared > 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 everything > 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