-
Notifications
You must be signed in to change notification settings - Fork 26
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
hello-f2py example #35
base: main
Are you sure you want to change the base?
Conversation
Would be great if you could add that the method to create the signature on the fly, something like this: # The module file for the signatures
set(hello_module "_hello")
# generate the signature file
set(hello_sig "${CMAKE_CURRENT_BINARY_DIR}/_hello_signature.pyf")
add_custom_command(
OUTPUT ${hello_sig}
COMMAND ${F2PY_EXECUTABLE} -m ${hello_module} hello.f90 -h ${siesta_sig} --overwrite-signature
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS hello.f90
COMMENT "Generating signature file files"
) then the signature need not be present. |
I can add @zerothi 's suggestion if a project maintainer agrees. But, because the F2PY docs suggest manual modifications to the signature after generation, I'm going to leave the example as-is for now. I don't think the |
You are probably right. :) |
Welp, this is now failing for me locally. Can't say what changed ... but now CMake claims to generate _hello-f2pywrappers2.f90 but does not, leading the subsequent build step to fail.
|
for more information, see https://pre-commit.ci
Adds a sample project in the style of hello-cython, using the
add_f2py_target
function provided by scikit-build.The example also demonstrates the minimal
setup.py
content when porting package metadata topyproject.toml
.This would close #29, but so would #32. My goal was to keep it very simple.