-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: Inplace builds (more?) do not install their __init__.pxd
well enough
#25135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Beats me, somehow it looks like Cython doesn't find our |
The mechanism used by Cython is to
Maybe somehow the inplace build is not putting the |
Yeah, you are right, the meson setup for the editable path just breaks this. It effecitvely adds NumPy as the |
I don't think this is specific to that. I've provided the |
Our tests pass, normal tests pass all with cython 3. Yes I am sure it is specific to picking up the wrong |
The correct |
Just to proof my point:
works fine since inserting the current directory fixes things. Part of the problem might be that Cython doesn't realize that the empty path In either case, happy for suggestions on how to band-aid it. Maybe one can xfail the test ideally on some condition related to such a bad environment. |
One bandaid would be to add a local |
__init__.pyd
well enough
This papers over numpygh-25135, it doesn't fix it, since we are finding the right NumPy, Cython should be finding the right pyd files also (whether this is a NumPy or a Cython issue).
Opened a Cython issue, not that I think it is super high priority, since it seems somehow related to in-place build. One thing I hadn't thought of before: There are zipped installs, I think. The Cython machinery probably also fails to pick it up there? That might be a bigger issue! |
We are talking about building a cython c-extension using the numpy c-api (once built the |
Hmmm, not sure if we even find the right headers for a zipped install, also. In which case it would be moot (even if it exists). So yeah, I am not sure there is anything to improve here really, you may just not be able to ship NumPy that way. (Since users may want to do local cython builds, not just build wheels.) |
__init__.pyd
well enough__init__.pxd
well enough
This is likely hard to fix. Perhaps Cython can special-case it in its discovery and tl;dr if you need to build against
agreed |
Maybe we should document this conclusion? At some point I would like to encourage Cython to drop their numpy pxd files. |
Yes, I think we should. Let's take that along in all the build docs that need writing/updating. mesonbuild/meson-python#429 is a similar issue. I think this can be closed now that the workaround in gh-25141 has been merged? |
Sounds like there isn't somthing we can easily/reasonably do about it, so yeah, lets close it. |
This papers over numpygh-25135, it doesn't fix it, since we are finding the right NumPy, Cython should be finding the right pyd files also (whether this is a NumPy or a Cython issue).
Describe the issue:
The 1.26.2 introduced a new test failure:
Full log below. I've used
maintenance/1.26.x
branch as of 4962e22 (which is equivalent to 1.26.2, except for the version number).Reproduce the code example:
Error message:
Runtime information:
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: