Bindings: Python: Add stubs

pull/64/head^2
Kyle Schwarz 2025-01-09 00:14:46 -05:00
parent f18aa00322
commit 2acf248583
4 changed files with 7 additions and 2 deletions

View File

@ -26,4 +26,8 @@ pybind11_add_module(icsneopy
) )
target_link_libraries(icsneopy PRIVATE icsneocpp) target_link_libraries(icsneopy PRIVATE icsneocpp)
install(TARGETS icsneopy LIBRARY DESTINATION .) install(TARGETS icsneopy LIBRARY DESTINATION icsneopy)
add_custom_command(TARGET icsneopy POST_BUILD COMMAND stubgen -m icsneopy -o .)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icsneopy.pyi __init__.py py.typed DESTINATION icsneopy)

View File

@ -0,0 +1 @@
from .icsneopy import *

View File

View File

@ -1,5 +1,5 @@
[build-system] [build-system]
requires = ["scikit-build-core", "pybind11", "setuptools>=64", "setuptools-scm>=8"] requires = ["scikit-build-core", "pybind11", "setuptools>=64", "setuptools-scm>=8", "mypy"]
build-backend = "scikit_build_core.build" build-backend = "scikit_build_core.build"
[project] [project]