-
Notifications
You must be signed in to change notification settings - Fork 24
Description
tl;dr: to use scipy_openblas32 with Fortran 77 code, do I need my own preprocessor mapping from "normal" to scipy_openblas symbols, e.g. -DDGETRF=SCIPY_DGETRF ?
I'm a maintainer of Slycot, which is a thin Python library around the Fortran 77 library SLICOT. One of our long-standing issues is to provide binary wheels on PyPI for Linux, Windows, and macos.
I've made a model of the problem at https://github.com/roryyorke/f77ex , which is a Python project with Fortran 77 code calling DGETRF. It's scikit-core-build-based, and successfully makes a manylinux binary wheel with bundled OpenBLAS.
To get this to work I needed to add compile-time flags -cpp -DDGETRF=SCIPY_DGETRF.
My questions:
- Am I doing this the hard way? Can I copy a solution from some other project? I have looked at Scipy's build code, but found it hard to follow.
- If a "normal"->"scipy_openblas" mapping is needed would this preprocessor option be best, or should I rather rename symbols in the object files using
objcopy? Or is there something else?
Any other advice, especially around getting this to work on Windows, would be gratefully received.