-
Notifications
You must be signed in to change notification settings - Fork 13
Fix: pybind11_stubgen command due to pybind11 version bump #102
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
base: branch-25.06
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
|
|
@@ -89,6 +89,7 @@ function(morpheus_utils_create_python_package PACKAGE_NAME) | |
| "${project_dir}/pyproject.toml" | ||
| "${project_dir}/setup.cfg" | ||
| "${project_dir}/setup.py" | ||
| "${project_dir}/versioneer.py" | ||
| ) | ||
|
|
||
| list(APPEND wheel_python_files ${wheel_python_project_files}) | ||
|
|
@@ -367,7 +368,6 @@ function(morpheus_utils_build_python_package PACKAGE_NAME) | |
|
|
||
| # Change which setup we use if we are using inplace | ||
| if(_ARGS_IS_INPLACE) | ||
| list(APPEND _pip_command "-e") | ||
| list(APPEND _pip_command "${sources_source_dir}") | ||
| else() | ||
| list(APPEND _pip_command "${sources_binary_dir}") | ||
|
|
@@ -622,10 +622,11 @@ macro(__create_python_library MODULE_NAME) | |
| # Before installing, create the custom command to generate the stubs | ||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think using the CMake command
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't think we want this which is why we have |
||
| DEPENDS ${PYTHON_ACTIVE_PACKAGE_NAME}-modules $<TARGET_OBJECTS:${TARGET_NAME}> | ||
| COMMENT "Building stub for python module ${TARGET_NAME}..." | ||
| WORKING_DIRECTORY ${module_root_binary_dir} | ||
| VERBATIM | ||
| ) | ||
|
|
||
| # Add a custom target to ensure the stub generation runs | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed? This will cause the files to be copied and leads to some confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was told it was unnecessary 🤷🏻♂️