Compiles OK, but says its not compiled.

9 views
Skip to first unread message

Steven Johnson

unread,
May 26, 2021, 7:51:04 AM5/26/21
to cython-users

I have a fast API project i am trying to test cython on to speed up some cpu intensive endpoints.  At the moment i am just trying to compile the .py files,  i am not expecting miracles, just want a baseline to start from.  I am building in a docker container.

The build proceeds fine, no errors, and if i shell in to the container its got all the .so files from the build.  But when the app runs and i print out cython.compiled it always says "False".

What could i be doing wrong?  What can i look at to try and diagnose this issue.
Here is the build.py i am running directly after i copy the files into the container.

https://pastebin.com/wgBNsp3F

And i am running it inside the container during the container build with:

python build.py build_ext --inplace

The code all runs fine, just not compiled.

Steven Johnson

unread,
May 27, 2021, 12:32:31 AM5/27/21
to cython-users
Hmm,

So i was running from head of the master branch.  I just noticed the recent alpha 7 git tagged, changed to that and the behavior has totally changed.  Now it looks like its doing something, because its throwing errors when i try to run like:
TypeError: Expected unicode, got FieldInfo

So progress.  I am not sure why using the head of master failed.
Reply all
Reply to author
Forward
0 new messages