Skip to content

Commit d3f570c

Browse files
authored
Merge pull request #5 from virtualcell/core-pyi-stubs
Ship _core.pyi type stubs (v1.0.2)
2 parents abc86b2 + 358ec83 commit d3f570c

3 files changed

Lines changed: 525 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.13)
2-
project(VCellMovingBoundary VERSION 1.0.1 LANGUAGES CXX C)
2+
project(VCellMovingBoundary VERSION 1.0.2 LANGUAGES CXX C)
33

44
# C++ standard
55
set(CMAKE_CXX_STANDARD 14)

python/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
5458
install(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

Comments
 (0)