@@ -32,7 +32,10 @@ add_custom_command(TARGET _core POST_BUILD
3232 COMMAND ${CMAKE_COMMAND } -E copy_if_different
3333 ${CMAKE_CURRENT_SOURCE_DIR } /${MB_PY_PACKAGE}/py.typed
3434 ${MB_PY_BUILD_DIR} /py.typed
35- COMMENT "Copying pyvcell_mbsolver/{__init__.py,py.typed} into the build tree"
35+ COMMAND ${CMAKE_COMMAND } -E copy_if_different
36+ ${CMAKE_CURRENT_SOURCE_DIR } /${MB_PY_PACKAGE}/_core.pyi
37+ ${MB_PY_BUILD_DIR} /_core.pyi
38+ COMMENT "Copying pyvcell_mbsolver/{__init__.py,py.typed,_core.pyi} into the build tree"
3639)
3740
3841# When building a wheel via scikit-build-core, SKBUILD is defined and the
@@ -49,11 +52,13 @@ install(TARGETS _core
4952 COMPONENT python
5053)
5154
52- # Install the pure-Python wrapper (the package __init__.py) and the PEP 561
53- # py.typed marker so type checkers use the package's inline annotations.
55+ # Install the pure-Python wrapper (the package __init__.py), the PEP 561
56+ # py.typed marker, and the _core type stub so type checkers use the package's
57+ # inline annotations and the compiled extension's signatures.
5458install (FILES
5559 ${CMAKE_CURRENT_SOURCE_DIR } /${MB_PY_PACKAGE} /__init__.py
5660 ${CMAKE_CURRENT_SOURCE_DIR } /${MB_PY_PACKAGE} /py.typed
61+ ${CMAKE_CURRENT_SOURCE_DIR } /${MB_PY_PACKAGE} /_core.pyi
5762 DESTINATION ${MB_PY_INSTALL_DEST}
5863 COMPONENT python
5964)
0 commit comments