diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 47813a0..aed911a 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -26,4 +26,8 @@ pybind11_add_module(icsneopy ) 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) diff --git a/bindings/python/__init__.py b/bindings/python/__init__.py new file mode 100644 index 0000000..f6be1c9 --- /dev/null +++ b/bindings/python/__init__.py @@ -0,0 +1 @@ +from .icsneopy import * diff --git a/bindings/python/py.typed b/bindings/python/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index 8f33408..6d462c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [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" [project]