-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BLD,BUG: quadmath required where available [f2py] #25073
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
Is this code tested? Maybe we should be moving the f2py test builds to meson |
|
Co-authored-by: rgommers <rgommers@users.noreply.github.com>
1e5ccb8
to
929f239
Compare
@mattip a small update, this PR is "sort of" tested in #25111. "sort of" because since #9673 back in 2017 none of the (compiled) F2PY tests are actually run on Windows. However I did test them manually, with a compatible toolchain, something which is hard to guarantee on the CI without |
I don't understand. We should be testing this. #9673 is a still-open issue. We have the rtools toolchain on windows with a fortran compiler specifically for tests. |
There are two problems here, firstly that (as noted) the F2PY tests have long been skipping all compiled Fortran module tests, ^--- This in itself isn't really an issue, I believe #9673 should probably be defunct with Compiler detectionOffloading the build step to
So what needs to happen is that we would need to propagate CLI arguments as environment variables through to all the Now even assuming we should modify the frontend to pass environment variables over to To me, it seems like it would dampen much of the benefits we gained (offloading the build complexity, not tracking compilers etc.) from the switch to CI TestingThis doesn't mean it is impossible to test on CI, just that the current interface is too rigid for it, and that the code shouldn't be bent out of shape just to satisfy the unit testing requirement. Instead, I believe the solution is to have a new CI job, where (some) Perhaps this should be moved to an issue of its own? |
We know what compiler is present on CI, we don't have to guess.
I opened #25134 |
Thanks @HaoZeke |
Not quite, you can supply a machine file to point at any binary: https://mesonbuild.com/Machine-files.html#binaries. This is for example what |
@HaoZeke I see that this has been merged and #25000 has been closed. So not sure what the right place is to mention this. However, for The following patch fixes it: diff --git a/numpy/f2py/_backends/_meson.py b/numpy/f2py/_backends/_meson.py
index 3176a5e08..14f9ace2b 100644
--- a/numpy/f2py/_backends/_meson.py
+++ b/numpy/f2py/_backends/_meson.py
@@ -7,6 +7,7 @@
from ._backend import Backend
from string import Template
+from itertools import chain
import warnings
@@ -84,6 +85,7 @@ def __init__(self, *args, **kwargs):
def _move_exec_to_root(self, build_dir: Path):
walk_dir = Path(build_dir) / self.meson_build_dir
path_objects = walk_dir.glob(f"{self.modulename}*.so")
+ path_objects = chain(path_objects, walk_dir.glob(f"{self.modulename}*.pyd"))
for path_object in path_objects:
shutil.move(path_object, Path.cwd()) Should I open a new bug report or a pull request (seems silly for 2 lines of code)? |
Actually a pull request would be great (we never have any patches committed to master) :) |
Closes gh-25000.
There's a longer explanation in the issue comment but essentially, for the most common toolchain (
gfortran
fromrtools
and standardpython
),quadmath
needs to be declared as an explicit dependency.Also updates the documentation with supported compiler toolchains.