-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: fix f2py
tests to work with v2 API
#26935
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
Conversation
Yeah, what we would need is detecting whether compilation should work first, and then compile only (rather than just trying to compile the actual module). @charris, I guess this is maybe the last thing for a 2.0.1? |
@@ -115,7 +115,7 @@ static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self, | |||
PyArray_DESCR(arr)->type, | |||
PyArray_TYPE(arr), | |||
PyArray_ITEMSIZE(arr), | |||
PyArray_DESCR(arr)->alignment, | |||
PyDataType_ALIGNMENT(arr), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core change
@@ -328,7 +342,7 @@ def build_meson(source_files, module_name=None, **kwargs): | |||
# compiler stack is on the CI | |||
try: | |||
backend.compile() | |||
except: | |||
except subprocess.CalledProcessError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better than a bare except
Thanks for fixing this, @paddyroddy seems I forgot to ask for that: But could you please undo the "non core" changes? |
EDIT: Sorry, wrong browser tab... |
This is a clear bug which CI unfortunately doesn't see because it just skips the f2py test if compilation fails (which it does here). The error is slightly more precise now, but not precise enough to avoid that issue.
Thanks, merging since we should backport this for 2.0.1. I did remove all the "non-core" changes from the PR, however. |
f2py
tests to work with v2 APIf2py
tests to work with v2 API
Cool, no problem. Sorry, I've been on holiday that past week. |
Fixes #26917. I've also modernised/improved the code in the relevant test files.
CI was failing prior to a4bd4a8 due to compiler errors in CI. Obviously not ideal reinstating this, but locally on my
macOS 14.5 arm64
all tests pass withspin test -m full
.