Skip to content

Commit 4225285

Browse files
authored
Merge pull request #4 from virtualcell/add-py-typed
Add py.typed marker (v1.0.1)
2 parents f612d6b + 4295ddd commit 4225285

3 files changed

Lines changed: 10 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.0 LANGUAGES CXX C)
2+
project(VCellMovingBoundary VERSION 1.0.1 LANGUAGES CXX C)
33

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

python/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ add_custom_command(TARGET _core POST_BUILD
2929
COMMAND ${CMAKE_COMMAND} -E copy_if_different
3030
${CMAKE_CURRENT_SOURCE_DIR}/${MB_PY_PACKAGE}/__init__.py
3131
${MB_PY_BUILD_DIR}/__init__.py
32-
COMMENT "Copying pyvcell_mbsolver/__init__.py into the build tree"
32+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
33+
${CMAKE_CURRENT_SOURCE_DIR}/${MB_PY_PACKAGE}/py.typed
34+
${MB_PY_BUILD_DIR}/py.typed
35+
COMMENT "Copying pyvcell_mbsolver/{__init__.py,py.typed} into the build tree"
3336
)
3437

3538
# When building a wheel via scikit-build-core, SKBUILD is defined and the
@@ -46,8 +49,11 @@ install(TARGETS _core
4649
COMPONENT python
4750
)
4851

49-
# Install the pure-Python wrapper (the package __init__.py).
50-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${MB_PY_PACKAGE}/__init__.py
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.
54+
install(FILES
55+
${CMAKE_CURRENT_SOURCE_DIR}/${MB_PY_PACKAGE}/__init__.py
56+
${CMAKE_CURRENT_SOURCE_DIR}/${MB_PY_PACKAGE}/py.typed
5157
DESTINATION ${MB_PY_INSTALL_DEST}
5258
COMPONENT python
5359
)

python/pyvcell_mbsolver/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)