Open
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. |
Author
|
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. :) |
Author
|
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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a sample project in the style of hello-cython, using the
add_f2py_targetfunction provided by scikit-build.The example also demonstrates the minimal
setup.pycontent when porting package metadata topyproject.toml.This would close #29, but so would #32. My goal was to keep it very simple.