diff --git a/CMakeLists.txt b/CMakeLists.txt index eb328f75c..ee4ad6a9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $ + DEPENDS _cl +) +install(TARGETS _cl LIBRARY DESTINATION pyopencl) # {{{ Print configuration diff --git a/pyopencl/py.typed b/pyopencl/py.typed new file mode 100644 index 000000000..e69de29bb