Skip to content
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

Generate nanobind type stubs #775

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,15 @@ if (PYOPENCL_USE_SHIPPED_EXT)
target_compile_definitions(_cl PRIVATE PYOPENCL_USE_SHIPPED_EXT=1)
endif()

install(TARGETS _cl LIBRARY DESTINATION pyopencl)
nanobind_add_stub(
pyopencl_stub
MODULE pyopencl._cl
OUTPUT _cl.pyi
PYTHON_PATH $<TARGET_FILE_DIR:_cl>
DEPENDS _cl
)

install(TARGETS _cl LIBRARY DESTINATION pyopencl)

# {{{ Print configuration

Expand Down
Empty file added pyopencl/py.typed
Empty file.
Loading