Fix: pybind11_stubgen command due to pybind11 version bump#102
Open
willkill07 wants to merge 1 commit intonv-morpheus:branch-25.06from
Open
Fix: pybind11_stubgen command due to pybind11 version bump#102willkill07 wants to merge 1 commit intonv-morpheus:branch-25.06from
willkill07 wants to merge 1 commit intonv-morpheus:branch-25.06from
Conversation
Co-authored-by: Paul Taylor <pataylor@nvidia.com> Signed-off-by: Will Killian <wkillian@nvidia.com>
mdemoret-nv
approved these changes
Apr 17, 2025
| add_custom_command( | ||
| OUTPUT ${module_binary_stub_file} | ||
| COMMAND ${Python3_EXECUTABLE} -m pybind11_stubgen ${TARGET_NAME} --no-setup-py --log-level WARN -o ./ --root-module-suffix \"\" | ||
| COMMAND env PYTHONPATH=${module_root_binary_dir}:$PYTHONPATH ${Python3_EXECUTABLE} -m pybind11_stubgen ${TARGET_NAME} --no-setup-py --log-level WARN -o ./ --root-module-suffix "" |
Contributor
There was a problem hiding this comment.
I think using the CMake command -E is preferred here. Something like add_custom_target(newtarget ${CMAKE_COMMAND} -E env NAME=VALUE somecommand)
Member
Author
There was a problem hiding this comment.
add_custom_target has the following behavior:
The target has no output file and is always considered out of date.
I don't think we want this which is why we have add_custom_command generate the stub file since we can easily specify the output file.
|
|
||
| # Change which setup we use if we are using inplace | ||
| if(_ARGS_IS_INPLACE) | ||
| list(APPEND _pip_command "-e") |
Contributor
There was a problem hiding this comment.
Why was this removed? This will cause the files to be copied and leads to some confusion.
Member
Author
There was a problem hiding this comment.
I was told it was unnecessary 🤷🏻♂️
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.
Description
pybind11 version bump resulted in this workflow for pybind11 stubgen not working. This PR fixes the command.
Checklist